为什么发送消息不存在?

2024-05-15 16:17:06 发布

您现在位置:Python中文网/ 问答频道 /正文

discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Bot' object has no attribute 'send_message'

我有个问题我真的不明白。这是我的密码:

async def sad(ctx):
    await client.send_message(ctx.message.author, 'sad')```

AttributeError: 'Bot' object has no attribute 'send_message'

Tags: nosendmessageobjectbotattributeextcommands