【发布时间】:2021-04-10 23:44:42
【问题描述】:
我正在尝试回复与我的机器人不一致的消息,但我不明白如何。
我看了一些答案,但我没有得到答案。有人说我需要写这段代码:await message.reply('Hello!', mention_author=True)
但它不起作用,我收到一个错误:discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Context' object has no attribute 'reply'
请帮助我!
【问题讨论】:
-
Discord.py 每两周更改一次 API。您查看的教程可能已过时。我认为您现在必须在所有命令中使用
context参数,并且可能缺少第一个参数。如果您的命令现在称为def example(msg),请尝试将其称为def example(ctx, msg)
标签: python discord discord.py