Discord.py: Delete Existing Help Command

Created on 7 Dec 2017  Â·  7Comments  Â·  Source: Rapptz/discord.py

If I want to have my own help command, how do I delete the existing help command?

Most helpful comment

bot=commands.Bot(...)
bot.remove_command("help")
#insert rest of code here
bot.run("<token>")

OR

#taking this to be a cog
def setup(bot):
    bot.remove_command("help")
    bot.add_cog(MyHelpCommandClass(bot))

All 7 comments

http://discordpy.readthedocs.io/en/rewrite/ext/commands/api.html#discord.Bot.formatter

By default, it uses the HelpFormatter. Check it for more info on how to override it. If you want to change the help command completely (add aliases, etc) then a call to remove_command() with ‘help’ as the argument would do the trick.

Where do we put the remove command? Do we put it in @bot.event ?

no you do that when instantiating your Bot instance or when loading the cog (if your command is in a cog)

So put it at where?

A line in front of bot.run?

bot=commands.Bot(...)
bot.remove_command("help")
#insert rest of code here
bot.run("<token>")

OR

#taking this to be a cog
def setup(bot):
    bot.remove_command("help")
    bot.add_cog(MyHelpCommandClass(bot))

Ok thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Shea4 picture Shea4  Â·  21Comments

wolfclaws picture wolfclaws  Â·  17Comments

Mercurial picture Mercurial  Â·  22Comments

downloadpizza picture downloadpizza  Â·  14Comments

0x78f1935 picture 0x78f1935  Â·  20Comments