Im working on a discord bot in python but as soon as I run the code it shows an error The command help is already an existing command or alias.
and it isn’t anywhere else in the code.
Here is the code
JavaScript
x
7
1
async def help(ctx):
2
embed = discord.Embed(title='Help', description='Use s!help <command> for more info on it')
3
embed.add_field(name="Moderation", value="Kick, Ban, Mute, Purge/Clean")
4
embed.add_field(name="Roleplay", value="Hug, Kiss, Slap, Shoot, Punch, lick, poke, cookies")
5
embed.add_field(name="Games", value='Dice, Slots,')
6
embed.add_field(name="Extras", value='Weather, Ping')
7
Advertisement
Answer
The help
command already exists so you need to remove the default one to overwrite it:
JavaScript
1
7
1
bot = commands.Bot(command_prefix='your prefix')
2
bot.remove_command('help')
3
4
#Your code
5
6
bot.run(token)
7