Skip to content
Advertisement

The code keeps on trowing an error “`The command help is already an existing command or alias“` Why is this so and how do I fix it?

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

async def help(ctx):
  embed = discord.Embed(title='Help', description='Use s!help <command> for more info on it')
  embed.add_field(name="Moderation", value="Kick, Ban, Mute, Purge/Clean")
  embed.add_field(name="Roleplay", value="Hug, Kiss, Slap, Shoot, Punch, lick, poke, cookies")
  embed.add_field(name="Games", value='Dice, Slots,')
  embed.add_field(name="Extras", value='Weather, Ping')

Advertisement

Answer

The help command already exists so you need to remove the default one to overwrite it:

bot = commands.Bot(command_prefix='your prefix')
bot.remove_command('help')

#Your code

bot.run(token)

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement