【发布时间】:2022-01-23 09:13:36
【问题描述】:
我希望我的 Discord.py 机器人等待 2 次反应...
代码:
def check(reaction, user):
return user == message.author and str(reaction.emoji) == '1️⃣'
def check(reaction, user):
return user == message.author and str(reaction.emoji) == '2️⃣'
mm = await message.send(embed=embed1)
await mm.add_reaction("1️⃣")
await mm.add_reaction("2️⃣")
reaction, user = await bot.wait_for("reaction_add",check=check,timeout=180)
reaction, user = await bot.wait_for("reaction_add",check=check,timeout=180)
if reaction:
await mm.edit(embed=embed1)
elif reaction:
await mm.edit(embed=embed3)
【问题讨论】:
-
能否也包含您的
check函数? -
ok 生病添加检查功能
标签: python discord discord.py message