Skip to main content
Shows a list of all available commands or detailed help for a specific command. The help command supports autocomplete for command names.

Usage

/help [command]

Parameters

command
string
The specific command to get help for. Leave empty to see all commands.

Implementation

src/commands/mod.rs:9-25
/// Shows a list of all commands
#[poise::command(slash_command, prefix_command)]
pub async fn help(
    ctx: Context<'_>,
    #[description = "The command to get help for"]
    #[autocomplete = "help_autocomplete"]
    command: Option<String>,
) -> Result<(), Error> {
    let config = HelpConfiguration::default();

    match command {
        Some(cmd) => help_single_command(ctx, &cmd, config).await?,
        None => help_all_commands(ctx, config).await?,
    };

    Ok(())
}

Features

Command Autocomplete

The help command includes autocomplete functionality that suggests command names as you type. It respects Discord’s locale settings and shows localized command names when available.
src/commands/mod.rs:27-41
async fn help_autocomplete<'a>(ctx: Context<'_>, partial: &'a str) -> Vec<String> {
    let cmds = &ctx.framework().options.commands;
    let locale = ctx.locale().unwrap_or("en-US");

    cmds.iter()
        .filter(move |cmd| {
            let name = cmd.name_localizations.get(locale).unwrap_or(&cmd.name);
            name.starts_with(partial)
        })
        .map(move |cmd| {
            let name = cmd.name_localizations.get(locale).unwrap_or(&cmd.name);
            name.to_string()
        })
        .collect::<Vec<_>>()
}

Help Display Modes

When called without parameters, displays a comprehensive list of all available commands grouped by category.Example:
/help
Response:
  • Lists all commands with their descriptions
  • Shows command prefixes (/ for slash commands, custom prefix for text commands)
  • Displays parameter information
  • Indicates required vs optional parameters

Help Configuration

The help command can be customized with the following options:
extra_text_at_bottom
string
default:""
Additional text displayed at the bottom of help messages for bot-specific tips
ephemeral
boolean
default:"true"
Whether to make help responses ephemeral (visible only to the requesting user)
show_context_menu_commands
boolean
default:"false"
Whether to include context menu commands in the help listing

Command Formatting

The help system automatically formats commands based on their type:
Command TypePrefixExample
Slash command//verify init email@example.com
Prefix commandCustom (from config)..help verify
Context menu(Context menu command on user/message)Right-click menu

Localization Support

The help command respects Discord’s user locale settings and displays command names and descriptions in the user’s preferred language when translations are available:
  • English (en-US)
  • German (de)
  • Japanese (ja)

Error Handling

If a command name is provided that doesn’t exist, the help command will display:
No such command `<command_name>`

register

Register slash commands with Discord

Build docs developers (and LLMs) love