【发布时间】:2023-03-24 06:42:01
【问题描述】:
message=await ctx.send(f"{ctx.author.mention}, after reacting to an emoji below the message will be edited to your choosen category)
await message.add_reaction('????')
await message.add_reaction('????')
await message.add_reaction('????')
await message.add_reaction('????')
message = await client.wait_for('on_reaction_add', timeout= 10, check=lambda message: message.author == ctx.author)
if message.reaction_add == '????':
await ctx.send("You reacted!")
我正在发出使用帮助页面的命令,它将预先存在的帮助消息编辑为用户选择的与他们做出反应的表情符号相对应的类别。
我使用了一种没有检查的方法,如果他们碰巧对这些表情符号对另一条消息做出反应,这会惹恼其他人,有没有办法进行类似于我已经做过或接近的检查,消息在哪里的帮助可以编辑到用户想要的页面,并且只有在他们使用专门为可以使用表情符号的作者的命令时才有效?
【问题讨论】:
-
这能回答你的问题吗? Discord.py-rewrite wait_for() how do i use?
标签: python discord.py