在不和谐的命令行中添加表情符号反应

Adding a emoji reaction to command line in discord

我希望机器人对我的命令行做出反应。例如:-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 是您要查找的内容(命令消息),然后向其添加所需的反应。

例如:

await ctx.message.add_reaction("✅")