我搜索了多个位置,它们都说要执行相同的操作,但是运行命令时仍会显示默认的help命令。我在打印行上收到消息discord.ext.commands.errors.CommandNotFound: Command "help" is not found
,但仍然在不一致时收到帮助消息。
这是我脚本中位于导入下方的顶部。
client = commands.Bot(command_prefix = '!')
client.remove_command('help')
答案 0 :(得分:1)
根据discordpy documentation,在声明客户端时将help_command
设置为None
即可解决问题。
client = commands.Bot(command_prefix = '!', help_command=None)
答案 1 :(得分:0)
client = commands.Bot(command_prefix = "#")
client.remove_command("help")
也可以