Why when i press button, my bot regardless of adding reactions on message printing "Timeout!" ?
how i can do a wait_for on reaction add ?
@bot.listen()
async def on_interaction(interaction):
if interaction.custom_id == 'balance':
msg = await interaction.user.send("Hola!")
await msg.add_reaction('🥳')
try:
await bot.wait_for("reaction_add", timeout=10.0, check=lambda user: user == interaction.user)
print('Hola!')
await msg.delete()
except asyncio.TimeoutError:
print('Timeout!')
await msg.delete()