Reputation: 13
when i try to create a command with "help" in it; it gives me an error so for example,
@client.command()
async def help():
print("this works :)")
if i create a command called "help" it gives an error
Traceback (most recent call last):
File "C:\Users\DELL\Desktop\School Club Discord bot\main.py", line 12, in
async def help():
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 1263, in decorator
self.add_command(result)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\core.py", line 1149, in add_command
raise CommandRegistrationError(command.name)
discord.ext.commands.errors.CommandRegistrationError: The command help is already an existing command or alias.
Upvotes: 0
Views: 69
Reputation: 36
Discord.py already has a built-in help function. you can change it like this:
client = commands.Bot(command_prefix='!', help_command=None)
@client.command()
async def help():
print("this works :)")
If you don't set help_command=None
and try to create your help command it will default to the built-in command and it will use that instead.
Upvotes: 1