Skip to content

Instantly share code, notes, and snippets.

@Gobot1234
Gobot1234 / Sub-Classing Help.MD
Last active July 29, 2021 09:16
A guide to sub-classing help with discord.py

Subclassing the help command in discord.py

This is going to be a short-ish guide on sub-classing help as ?tag new help isn't great at explaining things.

Choosing which help command to subclass

  1. Don't subclass HelpCommand unless you're going to override every one of the send_x methods, because that class does not do anything (it literally just returns None)
  2. DefaultHelpCommand is for the default help command (the code block one) Example of the default help command class
  3. MinimalHelpCommandis a minimalistic version of the help command, this is an example of the command produced if you copy ?tag new helpExample of the minimal help command class
  4. HelpCommand is a completely blank slate and can be subclassed to look any way you want, although most people use them for embeds ![My example of a help co
@EvieePy
EvieePy / error_handler.py
Last active January 16, 2024 15:12
Simple Error Handling for ext.commands - discord.py
"""
If you are not using this inside a cog, add the event decorator e.g:
@bot.event
async def on_command_error(ctx, error)
For examples of cogs see:
https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be
For a list of exceptions:
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#exceptions