【问题标题】:add reaction to a ctx.author message discord.py lib添加对 ctx.author 消息 discord.py 库的反应
【发布时间】:2021-03-22 21:06:14
【问题描述】:

我想对 ctx.author 消息做出反应。我尝试了什么:

@client.command()
async def help:
    command.add_reaction(':x:')
    await ctx.author.send('Something')

但是我得到那个命令没有 add_reaction

【问题讨论】:

    标签: python python-3.x discord.py


    【解决方案1】:

    command.add_reaction(':x:') 替换为await ctx.message.add_reaction('❌')

    【讨论】:

      【解决方案2】:

      正如 Matan 已经提到的以及未来的:您可以通过在 Discord 中使用:\emoji 将其粘贴到您的代码中,发送并复制转换后的文本。

      此文本可以粘贴到每个字符串中,Discord 会将其转换回常规表情。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2021-12-18
        • 1970-01-01
        • 1970-01-01
        • 2019-09-06
        • 2020-10-27
        • 2020-11-07
        • 2020-03-03
        相关资源
        最近更新 更多