SlashSubCommandGroups
Represents a sub-command group for a slash command.
Kind: global class
- SlashSubCommandGroups
- new SlashSubCommandGroups([data])
- .setName(name) ⇒
SlashSubCommandGroups - .setDescription(description) ⇒
SlashSubCommandGroups - .setDescriptionLocalizations(localizations) ⇒
SlashSubCommandGroups - .setNameLocalizations([localizations]) ⇒
SlashSubCommandGroups - .addSubCommands(fn) ⇒
SlashSubCommandGroups - .toJSON() ⇒
Object
new SlashSubCommandGroups([data])
Section titled “new SlashSubCommandGroups([data])”| Param | Type | Description |
|---|---|---|
| [data] | Object | The data for the sub-command group. |
| [data.name] | string | The name of the sub-command group. |
| [data.description] | string | The description of the sub-command group. |
| [data.nameLocalizations] | Object | The name localizations of the sub-command group. |
| [data.descriptionLocalizations] | Object | The description localizations of the sub-command group. |
| [data.options] | Array.<Object> | The sub-commands of the sub-command group. |
slashSubCommandGroups.setName(name) ⇒ SlashSubCommandGroups
Section titled “slashSubCommandGroups.setName(name) ⇒ SlashSubCommandGroups”Sets the name of the sub-command group.
Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.
| Param | Type | Description |
|---|---|---|
| name | string | The name of the sub-command group. |
slashSubCommandGroups.setDescription(description) ⇒ SlashSubCommandGroups
Section titled “slashSubCommandGroups.setDescription(description) ⇒ SlashSubCommandGroups”Sets the description of the sub-command group.
Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.
| Param | Type | Description |
|---|---|---|
| description | string | The description of the sub-command group. |
slashSubCommandGroups.setDescriptionLocalizations(localizations) ⇒ SlashSubCommandGroups
Section titled “slashSubCommandGroups.setDescriptionLocalizations(localizations) ⇒ SlashSubCommandGroups”Sets the description localizations of the sub-command group.
Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.
| Param | Type | Description |
|---|---|---|
| localizations | Object | The description localizations of the sub-command group. |
slashSubCommandGroups.setNameLocalizations([localizations]) ⇒ SlashSubCommandGroups
Section titled “slashSubCommandGroups.setNameLocalizations([localizations]) ⇒ SlashSubCommandGroups”Sets the name localizations of the sub-command group.
Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.
| Param | Type | Description |
|---|---|---|
| [localizations] | Object | The name localizations of the sub-command group. |
slashSubCommandGroups.addSubCommands(fn) ⇒ SlashSubCommandGroups
Section titled “slashSubCommandGroups.addSubCommands(fn) ⇒ SlashSubCommandGroups”Adds sub-commands to the sub-command group.
Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.
Throws:
RangeErrorWill throw an error if the sub-command builder is not of type ‘SlashSubCommandBuilder’.
| Param | Type | Description |
|---|---|---|
| fn | function | Array.<Object> | The sub-command builder function or array of sub-command objects. |
slashSubCommandGroups.toJSON() ⇒ Object
Section titled “slashSubCommandGroups.toJSON() ⇒ Object”Returns a JSON representation of the sub-command group.
Kind: instance method of SlashSubCommandGroups
Returns: Object - The JSON representation of the sub-command group.