【发布时间】: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
我想对 ctx.author 消息做出反应。我尝试了什么:
@client.command()
async def help:
command.add_reaction(':x:')
await ctx.author.send('Something')
但是我得到那个命令没有 add_reaction
【问题讨论】:
标签: python python-3.x discord.py
将command.add_reaction(':x:') 替换为await ctx.message.add_reaction('❌')
【讨论】:
正如 Matan 已经提到的以及未来的:您可以通过在 Discord 中使用:\emoji 将其粘贴到您的代码中,发送并复制转换后的文本。
此文本可以粘贴到每个字符串中,Discord 会将其转换回常规表情。
【讨论】: