首页 > 解决方案 > 添加对 ctx.author 消息 discord.py 库的反应

问题描述

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

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

但我得到那个命令没有 add_reaction

标签: pythonpython-3.xdiscord.py

解决方案


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


推荐阅读