Skip to content

Sub command

sub_command #

sub_command(name: str, *, display_name: LocalizedOr[str] | None = None, description: LocalizedOr[str] = 'No description', options: Sequence[Option] = ()) -> Callable[..., 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) –

    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.