From 7eeebb3d1359b2b5fa2728e2259941f275dc5312 Mon Sep 17 00:00:00 2001 From: Sylte Date: Mon, 31 Jul 2023 21:46:36 +0200 Subject: [PATCH] Fix the error in challenges assign_winners --- bot/extensions/challenges/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot/extensions/challenges/commands.py b/bot/extensions/challenges/commands.py index af170bd7..fdd05ba7 100644 --- a/bot/extensions/challenges/commands.py +++ b/bot/extensions/challenges/commands.py @@ -98,6 +98,8 @@ async def assign_winners(self, interaction: core.InteractionType, message_id: st except ValueError: return await interaction.response.send_message("Failed to convert message_id to integer.") + await interaction.response.defer(thinking=True) + try: message = await self.bot.http.get_message( channel_id=settings.challenges.discussion_channel_id, message_id=int(message_id) @@ -129,7 +131,7 @@ async def assign_winners(self, interaction: core.InteractionType, message_id: st output += "\n\nThese users failed though...\n\n" output += "\n".join(f"{user_id}: {reason}" for user_id, reason in failed.items()) - return await interaction.response.send_message(output) + return await interaction.followup.send(output) @app_commands.command() @app_commands.describe(member="Member to remove role from.")