API Reference#
Help Commands#
PaginatedHelpCommand#
- class nextcord.ext.help_commands.PaginatedHelpCommand(*args, **kwargs)#
Custom help command override using embeds and button pagination
- get_command_signature(command)#
Retrieves the signature portion of the help page.
- await send_bot_help(mapping)#
implements bot command help page
- await send_cog_help(cog)#
implements cog help page
- await send_command_help(group)#
implements group help page and command help page
- await send_group_help(group)#
implements group help page and command help page
EmbeddedHelpCommand#
- class nextcord.ext.help_commands.EmbeddedHelpCommand(*args, **kwargs)#
A help command implementation using embeds. This inherits from
HelpCommand
. It extends it with the following attributes.- dm_help#
A bool that indicates if the output should only be sent via DM instead of the channel. Defaults to False.
- Type:
- main_embed_title#
The title for the embed which gets sent by invoking help. Defaults to “Overview about Cogs, Groups and Commands”.
- Type:
- main_embed_description#
The description for the embed which gets sent by invoking help.
- Type:
Optional[
str
]
- main_embed_color#
The color for the embed which gets sent by invoking help. Defaults to default_color.
- Type:
Optional[
int
]
- command_embed_title#
The title for the embed which gets sent by help <command>. Defaults to “Command help”.
- Type:
- command_embed_description#
The description for the embed which gets sent by invoking help <command>. Defaults to “If a parameter is surrounded by <>, it is a required parameter\nIf a parameter is surrounded by [], it is an optional parameter.”
- Type:
- command_embed_color#
The color for the embed which gets sent by invoking help <command>. Defaults to default_color.
- Type:
Optional[
int
]
- group_embed_title#
The title for the embed which gets sent by invoking help <group>. Defaults to “Group help”.
- Type:
- group_embed_description#
The description for the embed which gets sent by invoking help <group>.
- Type:
Optional[
str
]
- group_embed_color#
The color for the embed which gets sent by invoking help <group>. Defaults to default_color.
- Type:
Optional[
int
]
- cog_embed_title#
The title for the embed which gets sent by invoking help <cog>. Defaults to “Cog help”.
- Type:
- cog_embed_description#
The description for the embed which gets sent by invoking help <cog>.
- Type:
Optional[
str
]
- cog_embed_color#
The color for the embed which gets sent by invoking help <cog>. Defaults to default_color.
- Type:
Optional[
int
]
- await send_bot_help(mapping)#
This function is a coroutine.
Handles the implementation of the bot command page in the help command. This function is called when the help command is called with no arguments.
It should be noted that this method does not return anything – rather the actual message sending should be done inside this method. Well behaved subclasses should use
get_destination()
to know where to send, as this is a customisation point for other users.You can override this method to customise the behaviour.
Note
You can access the invocation context with
HelpCommand.context
.Also, the commands in the mapping are not filtered. To do the filtering you will have to call
filter_commands()
yourself.- Parameters:
mapping (Mapping[Optional[
Cog
], List[Command
]]) – A mapping of cogs to commands that have been requested by the user for help. The key of the mapping is theCog
that the command belongs to, orNone
if there isn’t one, and the value is a list of commands that belongs to that cog.
- await send_cog_help(cog)#
This function is a coroutine.
Handles the implementation of the cog page in the help command. This function is called when the help command is called with a cog as the argument.
It should be noted that this method does not return anything – rather the actual message sending should be done inside this method. Well behaved subclasses should use
get_destination()
to know where to send, as this is a customisation point for other users.You can override this method to customise the behaviour.
Note
You can access the invocation context with
HelpCommand.context
.To get the commands that belong to this cog see
Cog.get_commands()
. The commands returned not filtered. To do the filtering you will have to callfilter_commands()
yourself.- Parameters:
cog (
Cog
) – The cog that was requested for help.
- await send_command_help(command)#
This function is a coroutine.
Handles the implementation of the single command page in the help command.
It should be noted that this method does not return anything – rather the actual message sending should be done inside this method. Well behaved subclasses should use
get_destination()
to know where to send, as this is a customisation point for other users.You can override this method to customise the behaviour.
Note
You can access the invocation context with
HelpCommand.context
.Showing Help
There are certain attributes and methods that are helpful for a help command to show such as the following:
Command.help
Command.brief
Command.short_doc
Command.description
get_command_signature()
There are more than just these attributes but feel free to play around with these to help you get started to get the output that you want.
- Parameters:
command (
Command
) – The command that was requested for help.
- await send_group_help(group)#
This function is a coroutine.
Handles the implementation of the group page in the help command. This function is called when the help command is called with a group as the argument.
It should be noted that this method does not return anything – rather the actual message sending should be done inside this method. Well behaved subclasses should use
get_destination()
to know where to send, as this is a customisation point for other users.You can override this method to customise the behaviour.
Note
You can access the invocation context with
HelpCommand.context
.To get the commands that belong to this group without aliases see
Group.commands
. The commands returned not filtered. To do the filtering you will have to callfilter_commands()
yourself.- Parameters:
group (
Group
) – The group that was requested for help.
Exceptions#
- class nextcord.ext.help_commands.MissingDependencyError(class_name, dependency, extra_group=None)#