Skip to content
This repository was archived by the owner on Sep 29, 2021. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions userbot/modules/afk.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ async def set_afk(afk_e):
afk_start = start_1.replace(microsecond=0)
if string:
AFKREASON = string
await afk_e.edit(f"Going AFK!\
await afk_e.edit(f"Into The Silence!\
\nReason: `{string}`")
else:
await afk_e.edit("Going AFK!")
await afk_e.edit("Into The Silence!")
if BOTLOG:
await afk_e.client.send_message(BOTLOG_CHATID, "#AFK\nYou went AFK!")
await afk_e.client.send_message(BOTLOG_CHATID, "#AFK\nYou go to the Silence!")
ISAFK = True
afk_time = datetime.now() # pylint:disable=E0602
raise StopPropagation
Comment on lines -74 to 82
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ganti`

Expand All @@ -97,7 +97,7 @@ async def type_afk_is_not_true(notafk):
afk_end = back_alive.replace(microsecond=0)
if ISAFK:
ISAFK = False
msg = await notafk.respond("I'm no longer AFK.")
msg = await notafk.respond("Coming back from Silence!")
time.sleep(3)
await msg.delete()
if BOTLOG:
Comment on lines 97 to 103
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ganti

Expand Down Expand Up @@ -163,7 +163,7 @@ async def mention_afk(mention):
afk_since = f"`{int(seconds)}s` ago"
if mention.sender_id not in USERS:
if AFKREASON:
await mention.reply(f"I'm AFK since {afk_since}.\
await mention.reply(f"I'm not active right now {afk_since}.\
\nReason: `{AFKREASON}`")
else:
await mention.reply(str(choice(AFKSTR)))
Comment on lines 163 to 169
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ganti

Expand All @@ -172,7 +172,7 @@ async def mention_afk(mention):
elif mention.sender_id in USERS:
if USERS[mention.sender_id] % randint(2, 4) == 0:
if AFKREASON:
await mention.reply(f"I'm still AFK since {afk_since}.\
await mention.reply(f"I'm still not active right now {afk_since}.\
\nReason: `{AFKREASON}`")
else:
await mention.reply(str(choice(AFKSTR)))
Comment on lines 172 to 178
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ganti

Expand Down