Python 3.x 在discord中向命令行添加表情反应
我希望机器人对我的命令行做出反应。例如:-suggest suggestion<我想在那个句子中添加一个拇指表情符号。我已经知道如何将反应添加到命令的结果中,但我不知道如何对命令行作出反应 我得到了这个简单的建议命令,现在它给出了对命令结果的反应:Python 3.x 在discord中向命令行添加表情反应,python-3.x,discord.py,discord.py-rewrite,Python 3.x,Discord.py,Discord.py Rewrite,我希望机器人对我的命令行做出反应。例如:-suggest suggestion
@commands.cooldown(1, 5, commands.BucketType.user)
async def suggest(ctx,*, suggestion):
channel = client.get_channel(754640430670413835)
embed = discord.Embed(color=0x55f7b1, timestamp=ctx.message.created_at)
embed.set_author(name="{}".format(ctx.author),icon_url="{}".format(ctx.author.avatar_url))
embed.add_field(name="Suggestion:", value="{}".format(suggestion), inline=False)
embed.set_footer(text="{}.".format(ctx.author))
embed1 = await channel.send(embed=embed)
emoji1 = '\N{THUMBS DOWN SIGN}'
emoji2 = '\N{THUMBS UP SIGN}'
await embed1.add_reaction(emoji2)
await embed1.add_reaction(emoji1)
await ctx.send("Thank you for your suggestion {}".format(ctx.author.mention)
ctx.message
是您要查找的内容(命令消息),然后将想要的反应添加到该消息中
例如:
等待ctx.message.add\u反应(“✅")
您到底想完成什么?请更清楚。