yeah ok this is good i think
This commit is contained in:
parent
abbf7aa544
commit
7849e76d28
|
@ -5,15 +5,24 @@ class AfkCommands:
|
|||
async def handle_afk_dm(self, message):
|
||||
"""Handle DMs when in AFK mode"""
|
||||
if self.bot.AFK_STATUS and message.author.id not in self.bot.AFK_NOTIFIED_USERS:
|
||||
self.bot.AFK_NOTIFIED_USERS.append(message.author.id)
|
||||
await message.reply(
|
||||
"Heya, I'm not at my computer right now, if you're requesting something please follow <https://nohello.club>. I'll let you know when I'm back :) \n\n-# This action was automated."
|
||||
)
|
||||
self.bot.AFK_NOTIFIED_USERS.append(message.author.id)
|
||||
await message.channel.send(f"AFK reason:\n{self.bot.AFK_REASON}")
|
||||
|
||||
|
||||
async def cmd_afk(self, message):
|
||||
"""Enable AFK mode"""
|
||||
if not self.bot.AFK_STATUS:
|
||||
self.bot.AFK_STATUS = True
|
||||
try:
|
||||
self.bot.AFK_REASON = message.content[5:]
|
||||
except IndexError:
|
||||
pass
|
||||
finally:
|
||||
if not self.bot.AFK_REASON.strip():
|
||||
self.bot.AFK_REASON = "None"
|
||||
await message.reply("k")
|
||||
else:
|
||||
await message.reply("You are already in AFK mode.", silent=True)
|
||||
|
|
Loading…
Reference in a new issue