Skip to content

SlashSubCommandGroups

Represents a sub-command group for a slash command.

Kind: global class

ParamTypeDescription
[data]ObjectThe data for the sub-command group.
[data.name]stringThe name of the sub-command group.
[data.description]stringThe description of the sub-command group.
[data.nameLocalizations]ObjectThe name localizations of the sub-command group.
[data.descriptionLocalizations]ObjectThe description localizations of the sub-command group.
[data.options]Array.<Object>The sub-commands of the sub-command group.

Sets the name of the sub-command group.

Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.

ParamTypeDescription
namestringThe name of the sub-command group.

Sets the description of the sub-command group.

Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.

ParamTypeDescription
descriptionstringThe description of the sub-command group.

Sets the description localizations of the sub-command group.

Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.

ParamTypeDescription
localizationsObjectThe description localizations of the sub-command group.

Sets the name localizations of the sub-command group.

Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.

ParamTypeDescription
[localizations]ObjectThe name localizations of the sub-command group.

Adds sub-commands to the sub-command group.

Kind: instance method of SlashSubCommandGroups
Returns: SlashSubCommandGroups - The sub-command group object.
Throws:

  • RangeError Will throw an error if the sub-command builder is not of type ‘SlashSubCommandBuilder’.
ParamTypeDescription
fnfunction | Array.<Object>The sub-command builder function or array of sub-command objects.

Returns a JSON representation of the sub-command group.

Kind: instance method of SlashSubCommandGroups
Returns: Object - The JSON representation of the sub-command group.