0
votes

Getting this error while awaiting reaction to a message which the bot send before to the user dms

reaction = await client.wait_for("reaction_add")
if str(reaction.emoji) == "1️⃣":
  await player.user.send("you have selected %s lol"%(members[0]))

Error:

'tuple' object has no attribute 'emoji'
1

1 Answers

1
votes

When waiting for a reaction the wait_for method returns two values - discord.Reaction and discord.User instances. To fix your code:

reaction, user = await client.wait_for("reaction_add")