【问题标题】:How to Fix "discord.ext.commands.errors.CommandRegistrationError: The command help is already an existing command or alias." in Python Discord Bot如何修复 Python Discord Bot 中的“discord.ext.commands.errors.CommandRegistrationError:命令帮助已经是现有命令或别名。”
【发布时间】:2022-10-01 19:26:34
【问题描述】:

C:\\Just_us_together\\main.py:2: DeprecationWarning: imp 模块已弃用,取而代之的是 importlib;请参阅模块的文档以了解替代用途

进口小鬼

Traceback (most recent call last):

  File \"C:\\Just_us_together\\main.py\", line 57, in <module>
    async def help(ctx):

  File \"C:\\Just_us_together\\Just_us_together\\lib\\site-packages\\discord\\ext\\commands\\core.py\", line 1476, in decorator
    self.add_command(result)

  File \"C:\\Just_us_together\\Just_us_together\\lib\\site-packages\\discord\\ext\\commands\\bot.py\", line 245, in add_command
    super().add_command(command)

  File \"C:\\Just_us_together\\Just_us_together\\lib\\site-packages\\discord\\ext\\commands\\core.py\", line 1311, in add_command
    raise CommandRegistrationError(command.name)

discord.ext.commands.errors.CommandRegistrationError: The command help is already an existing command or alias.

This is Line 57

我不知道如何解决这些问题;-;

标签: python visual-studio-code discord.py


【解决方案1】:

这意味着有一个具有相同名称的命令或其别名中的名称已经存在。您可能应该发布代码。

【讨论】:

  • 如何发布它有 600 行的代码。:-:::::
  • 你可以修复它我从来没有使用过这个网站。:_;;;;;;;;;;;;
  • 当我将第 57 行中的帮助更改为 H 时,它是新的。
  • 我更改了帮助命令的名称,机器人工作了。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-07-25
  • 1970-01-01
  • 2021-04-12
  • 2020-11-18
  • 2021-06-13
  • 2018-10-21
  • 2021-03-01
相关资源
最近更新 更多