Python AttributeError:“命令”对象没有属性“检查”

Python AttributeError:“命令”对象没有属性“检查”,python,discord.py,Python,Discord.py,新错误。W/o@commands.checkuser_是我所有的作品您需要将pass_context=True参数用于bot.command才能传递上下文 def user_is_me(ctx): return ctx.message.author.id == "310426385090871296" @FiveStarBot.command(pass_context=True) @commands.check(user_is_me) async def message(cxt, me

新错误。W/o@commands.checkuser_是我所有的作品

您需要将pass_context=True参数用于bot.command才能传递上下文

def user_is_me(ctx):
    return ctx.message.author.id == "310426385090871296"

@FiveStarBot.command(pass_context=True)
@commands.check(user_is_me)
async def message(cxt, member: discord.Member, *, text : str):
    print('\n[Лог использования команды !message]')
    print('Отправитель: ', cxt.message.author, ' Получатель: ', member, ' Текст: ', text)
    await FiveStarBot.send_message(member, text)

请将错误堆栈跟踪放在post中。此外,请发布更多代码。在这里无法识别代码的问题。我在使用新命令时遇到了新错误@FiveStarBot.commandpass\u context=True@commands.checkuser\u是异步定义消息cxt,成员:discord.member,*,文本:str:print'\n[china],text wait fivesabot.send_messagemember,文本错误:AttributeError:'Command'对象没有属性'check'@romansury是否有名为commands的命令?停止重复使用名称。如果必须的话,您可以将coroutine命令命名为\,然后将name=命令传递给bot.commands,这样会犯很多愚蠢的错误。是的,我已经有了“命令”命令。再次感谢你帮助我。
@bot.command(pass_context=True)
@commands.check(user_is_me)
async def hello(cxt):
   await bot.say('Hello')