删除Discord上的默认帮助命令

时间:2020-09-11 16:28:36

标签: python discord.py

我搜索了多个位置,它们都说要执行相同的操作,但是运行命令时仍会显示默认的help命令。我在打印行上收到消息discord.ext.commands.errors.CommandNotFound: Command "help" is not found,但仍然在不一致时收到帮助消息。

这是我脚本中位于导入下方的顶部。

client = commands.Bot(command_prefix = '!')
client.remove_command('help')

2 个答案:

答案 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")

也可以