From c5c0fcf1876ccae7d658c700f8929786df1caeac Mon Sep 17 00:00:00 2001 From: Glitchy Date: Fri, 9 May 2025 18:39:19 +0000 Subject: [PATCH] improved .afk no gpt :OOOOOO --- bot/commands/afk_commands.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bot/commands/afk_commands.py b/bot/commands/afk_commands.py index 9ae69f5..42a686c 100644 --- a/bot/commands/afk_commands.py +++ b/bot/commands/afk_commands.py @@ -32,7 +32,16 @@ class AfkCommands: except Exception as e: raise RuntimeWarning from e + messaged_users_string = "" + for i in self.bot.AFK_NOTIFIED_USERS: + try: + user = await self.bot.fetch_user(i) + if user: + messaged_users_string += f"\n\\- {user.id} | {user.name}" + except Exception as e: + raise RuntimeWarning from e + + await message.reply(f"should work, here are the people who dmed you:" + (messaged_users_string if messaged_users_string else "\nnobody because you're alone asf obvs")) self.bot.AFK_NOTIFIED_USERS.clear() - await message.reply("should work") else: - await message.reply("You are not in AFK mode.", silent=True) \ No newline at end of file + await message.reply("You are not in AFK mode.", silent=True)