Help Command API Reference#
- class lightbulb.help_command.BaseHelpCommand(app: app_.BotApp)[source]#
Base class for auto-generated help commands.
- Parameters
app (
BotApp
) – TheBotApp
instance that the help command is registered to.
- async object_not_found(context: context_.base.Context, obj: str) None [source]#
Method called when no object could be resolved from the given name.
- abstract async send_bot_help(context: context_.base.Context) None [source]#
Sends an overall help message for the bot. This is called when no object is provided when the help command is invoked.
- Parameters
context (
Context
) – Context to send help to.- Returns
None
- abstract async send_command_help(context: context_.base.Context, command: commands.base.Command) None [source]#
Sends a help message for the given command.
- abstract async send_group_help(context: context_.base.Context, group: t.Union[commands.prefix.PrefixCommandGroup, commands.prefix.PrefixSubGroup, commands.slash.SlashCommandGroup, commands.slash.SlashSubGroup]) None [source]#
Sends a help message for the given command group.
- Parameters
context (
Context
) – Context to send help to.group – Command group to send help for.
- Returns
None
- async send_help(context: context_.base.Context, obj: t.Optional[str]) None [source]#
Resolve the given object and send the help text for it to the given context.
Help resolution order:
Prefix command
Slash command
Message command
User command
Plugin
- abstract async send_plugin_help(context: context_.base.Context, plugin: plugins.Plugin) None [source]#
Sends a help message for the given plugin.
- app: app_.BotApp#
The
BotApp
instance the help command is registered to.
- class lightbulb.help_command.DefaultHelpCommand(app: app_.BotApp)[source]#
An implementation of the
BaseHelpCommand
that the bot uses by default.- async send_bot_help(context: context_.base.Context) None [source]#
Sends an overall help message for the bot. This is called when no object is provided when the help command is invoked.
- Parameters
context (
Context
) – Context to send help to.- Returns
None
- async send_command_help(context: context_.base.Context, command: commands.base.Command) None [source]#
Sends a help message for the given command.
- async send_group_help(context: context_.base.Context, group: t.Union[commands.prefix.PrefixCommandGroup, commands.prefix.PrefixSubGroup, commands.slash.SlashCommandGroup, commands.slash.SlashSubGroup]) None [source]#
Sends a help message for the given command group.
- Parameters
context (
Context
) – Context to send help to.group – Command group to send help for.
- Returns
None
- async lightbulb.help_command.filter_commands(cmds: t.Sequence[commands.base.Command], context: context_.base.Context) t.Sequence[commands.base.Command] [source]#
Evaluates the checks for each command provided, removing any that the checks fail for. This effectively removes any commands from the given collection that could not be invoked under the given context. This will also remove any commands with the
hidden
attribute set toTrue
.