【问题标题】:Removing the default help command on discord删除不和谐的默认帮助命令
【发布时间】:2020-11-08 01:47:43
【问题描述】:

我搜索了多个地方,他们都说要做同样的事情,但是当我运行命令时,默认的帮助命令仍然显示。我在打印行收到消息discord.ext.commands.errors.CommandNotFound: Command "help" is not found,但仍然收到有关不和谐的帮助消息。

这是在我的脚本顶部,就在导入下方。

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

【问题讨论】:

    标签: python discord.py


    【解决方案1】:

    根据discordpy documentation,在声明客户端时将help_command设置为None即可解决问题。

    client = commands.Bot(command_prefix = '!', help_command=None)
    

    【讨论】:

    • 我想我试过了,但我回家后会再试一次
    【解决方案2】:
    client = commands.Bot(command_prefix = "#")
    client.remove_command("help")
    

    同样有效

    【讨论】:

      猜你喜欢
      • 2018-02-07
      • 2020-10-19
      • 1970-01-01
      • 2020-12-26
      • 2018-08-15
      • 2021-01-06
      • 1970-01-01
      • 2021-04-17
      • 2021-07-26
      相关资源
      最近更新 更多