使用 "wait_for" discord.py 等待反应时出错

Getting an error while awaiting reaction using "wait_for" discord.py

在等待对机器人之前发送给用户 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'

等待反应时 wait_for 方法 returns 两个值 - discord.Reactiondiscord.User 实例。要修复您的代码:

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