Skip to content

Commit

Permalink
Merge pull request #229 from SylteA/fix/app-commands/challenges-assig…
Browse files Browse the repository at this point in the history
…n_winners

Fix the error in challenges assign_winners
SylteA authored Jul 31, 2023
2 parents 1acd35a + 7eeebb3 commit 1a0c149
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
@@ -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.")

0 comments on commit 1a0c149

Please sign in to comment.