Skip to content

SlashSubCommands

SlashSubCommands

A class representing a slash subcommand for Discord slash commands.

Kind: global class

new SlashSubCommands(data)

Create a new SlashSubCommands instance.

ParamTypeDescription
dataObjectThe data for the subcommand.
data.namestringThe name of the subcommand.
data.descriptionstringThe description of the subcommand.
data.name_localizationsObjectThe localized names of the subcommand.
data.description_localizationsObjectThe localized descriptions of the subcommand.
data.optionsArray.<Object>The options for the subcommand.

slashSubCommands.setName(name) ⇒ SlashSubCommands

Set the name of the subcommand.

Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.

ParamTypeDescription
namestringThe name of the subcommand.

slashSubCommands.setDescription(description) ⇒ SlashSubCommands

Set the description of the subcommand.

Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.

ParamTypeDescription
descriptionstringThe description of the subcommand.

slashSubCommands.setDescriptionLocalizations(localizations) ⇒ SlashSubCommands

Set the localized descriptions of the subcommand.

Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.

ParamTypeDescription
localizationsObjectThe localized descriptions of the subcommand.

slashSubCommands.setNameLocalizations(localizations) ⇒ SlashSubCommands

Set the localized names of the subcommand.

Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.

ParamTypeDescription
localizationsObjectThe localized names of the subcommand.

slashSubCommands.setOptions(fn) ⇒ SlashSubCommands

Set the options for the subcommand.

Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.

ParamTypeDescription
fnObject | functionThe options for the subcommand.

slashSubCommands.toJSON() ⇒ Object

Convert the SlashSubCommands instance to a JSON object.

Kind: instance method of SlashSubCommands
Returns: Object - The JSON representation of the SlashSubCommands instance.