fix: Ensure save_giveaways is awaited in GiveawayEnterButton to improve async handling

This commit is contained in:
Slipstream 2025-05-30 16:53:26 -06:00
parent 161975731c
commit a3bf678b32
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -54,7 +54,7 @@ class GiveawayEnterButton(ui.Button['GiveawayEnterView']):
await interaction.response.send_message("You have already entered this giveaway!", ephemeral=True)
else:
giveaway["participants"].add(interaction.user.id)
self.cog.save_giveaways() # Save after participant update
await self.cog.save_giveaways() # Save after participant update
await interaction.response.send_message("You have successfully entered the giveaway!", ephemeral=True)
# Update participant count in embed if desired (optional)