Skip to content

Commit

Permalink
fix: interaction response was not sent
Browse files Browse the repository at this point in the history
  • Loading branch information
eluric committed Mar 4, 2024
1 parent a99b0b5 commit efc73f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cogs/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ async def delete_puzzle(self, interaction: discord.Interaction, puzzle_id: str):
@app_commands.command(name="list_puzzles", description="List all created puzzles.")
@commands.has_role(EXEC_ID)
async def list_puzzles(self, interaction: discord.Interaction):
await interaction.response.defer()

uts_puzzles = await get_puzzles_by_uni("UTS")
unsw_puzzles = await get_puzzles_by_uni("UNSW")
usyd_puzzles = await get_puzzles_by_uni("USYD")
Expand Down Expand Up @@ -148,6 +150,8 @@ async def list_puzzles(self, interaction: discord.Interaction):
puzzles_embed.add_field(name="Puzzles", value="\n".join(all_puzzle_name_links))
puzzles_embed.add_field(name="Answers", value="\n".join(all_puzzle_answers))

await interaction.followup.send(embed=puzzles_embed)

@app_commands.command(
name="set_hint_channel",
description="Set the current channel to be the hint channel.",
Expand Down

0 comments on commit efc73f6

Please sign in to comment.