Subcommand Groups
Table of Contents
Sub command groups
Sub-commands are apart of slash commands and are used to add as the name already suggest sub commands to the regular slash command. Which does not only “bypass” the slash command limit but also allows you to properly structure your application commands.
Creating Application Commands
Field | Type | Description | Required |
---|---|---|---|
guildID/global | string number | The type of application command, either for every guild (global) or for one specific guild (specific guildID). | true |
name | string, number | The actual slash command name that will be visible to the user. | true |
description | string, number | The slash command description that will be visible to the user. | true |
defaultPermission | string | If the application command should synchronize to the default permissions. | true |
type | string | The application command type (explained below) | true |
options? | object | Slash commands options. | true |
Examples of creating Application Commands with sub command groups
The official documentation can be found here
Preview of the Example
Replying to Sub commands/groups
You can filter sub_command_group
s directly in the command options.
This would only make the bot reply to the “user” sub-command-group, you can return the sub-command-group with $interactionData[options._group]
.