Skip to content

Commit

Permalink
Fixed afk
Browse files Browse the repository at this point in the history
  • Loading branch information
buddhhu authored Apr 15, 2021
1 parent 13af61d commit b7f8cd5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/afk.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

from pyUltroid.functions.pmpermit_db import *
from telethon import events
from telethon.tl import functions, types
from telethon.tl.functions.account import GetPrivacyRequest
from telethon.tl.types import InputPrivacyKeyStatusTimestamp, PrivacyValueAllowAll


from . import *

Expand Down Expand Up @@ -182,9 +184,9 @@ async def _(event):
pic = None
if not USER_AFK:
last_seen_status = await ultroid_bot(
functions.account.GetPrivacyRequest(types.InputPrivacyKeyStatusTimestamp()),
GetPrivacyRequest(InputPrivacyKeyStatusTimestamp()),
)
if isinstance(last_seen_status.rules, types.PrivacyValueAllowAll):
if isinstance(last_seen_status.rules, PrivacyValueAllowAll):
afk_time = datetime.datetime.now()
USER_AFK = f"yes: {reason} {pic}"
if reason:
Expand Down

0 comments on commit b7f8cd5

Please sign in to comment.