Skip to content

Commit

Permalink
defer the response and remove the ephemeral after sending poll
Browse files Browse the repository at this point in the history
  • Loading branch information
FirePlank committed Nov 2, 2023
1 parent e001d43 commit d1f15c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bot/extensions/polls/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ async def create_poll(self, interaction: core.InteractionType, _button: ui.Butto
"You can't create a poll with less than 2 choices", ephemeral=True
)

await interaction.channel.send(embed=embed)
message = await interaction.original_response()
await interaction.response.defer()
message = await interaction.channel.send(embed=embed)

for i in range(0, len(embed.fields)):
await message.add_reaction(emojis[i])

await interaction.delete_original_response()

0 comments on commit d1f15c1

Please sign in to comment.