Skip to content

Sub command

sub_command #

sub_command(name: str | None = None, description: LocalizedOr[str] = 'No description', *, display_name: LocalizedOr[str] | None = None, options: Sequence[Option] = (), hooks: Sequence[Hook] = ()) -> Callable[[CommandCallbackT], SubCommand]

Decorator for the sub-command.

Can be used only in a command class that inherits from aurum.commands.slash_command.SlashCommand.

Parameters:

  • name (str, default: None ) –

    The unique name for the sub-command.

  • description (LocalizedOr[str] | None, default: 'No description' ) –

    Optional description for the sub-command.

  • display_name (LocalizedOr[str] | None, default: None ) –

    A display name of command. Can be localized.

  • options (Sequence[Option], default: () ) –

    Optional options of the sub-command.

Note

The callback must be asynchronous.