Command Structuring

Base commands, Subcommands, Subcommand groups - what?

A base command is for example /help. It does not have any subcommands or groups.

/config on the other side has both - subcommands and subcommand groups.

Subcommands organize commands by specifying actions within a command or group.

Subcommand Groups organize subcommands by grouping subcommands by similar action or resource within a command.

Groups cannot be executed, they are just like folders within a file-like system.

Visual examples:

/command
|
|__ subcommand
|
|__ subcommand


/command
|
|__ subcommand-group
    |
    |__ subcommand
|
|__ subcommand-group
    |
    |__ subcommand


/command
|
|__ subcommand-group
    |
    |__ subcommand
|
|__ subcommand

Real-world Examples

If you want to go more in-depth, take a look at the Developer Docsarrow-up-right.

Last updated

Was this helpful?