Skip to content

Commit

Permalink
Fix the error in challenges assign_winners
Browse files Browse the repository at this point in the history
  • Loading branch information
SylteA committed Jul 31, 2023
1 parent 1acd35a commit 7eeebb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bot/extensions/challenges/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.")
Expand Down

0 comments on commit 7eeebb3

Please sign in to comment.