Skip to content

SlashSubCommandGroups

SlashSubCommandGroups

Represents a sub-command group for a slash command.

Kind: global class

new SlashSubCommandGroups([data])

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.

slashSubCommandGroups.setName(name) ⇒ SlashSubCommandGroups

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.

slashSubCommandGroups.setDescription(description) ⇒ SlashSubCommandGroups

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.

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.

ParamTypeDescription
localizationsObjectThe description localizations of the sub-command group.

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.

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

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:

  • 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.

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.