SlashSubCommands
A class representing a slash subcommand for Discord slash commands.
Kind: global class
new SlashSubCommands(data)
Section titled “new SlashSubCommands(data)”Create a new SlashSubCommands instance.
| Param | Type | Description |
|---|---|---|
| data | Object | The data for the subcommand. |
| data.name | string | The name of the subcommand. |
| data.description | string | The description of the subcommand. |
| data.name_localizations | Object | The localized names of the subcommand. |
| data.description_localizations | Object | The localized descriptions of the subcommand. |
| data.options | Array.<Object> | The options for the subcommand. |
slashSubCommands.setName(name) ⇒ SlashSubCommands
Section titled “slashSubCommands.setName(name) ⇒ SlashSubCommands”Set the name of the subcommand.
Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.
| Param | Type | Description |
|---|---|---|
| name | string | The name of the subcommand. |
slashSubCommands.setDescription(description) ⇒ SlashSubCommands
Section titled “slashSubCommands.setDescription(description) ⇒ SlashSubCommands”Set the description of the subcommand.
Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.
| Param | Type | Description |
|---|---|---|
| description | string | The description of the subcommand. |
slashSubCommands.setDescriptionLocalizations(localizations) ⇒ SlashSubCommands
Section titled “slashSubCommands.setDescriptionLocalizations(localizations) ⇒ SlashSubCommands”Set the localized descriptions of the subcommand.
Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.
| Param | Type | Description |
|---|---|---|
| localizations | Object | The localized descriptions of the subcommand. |
slashSubCommands.setNameLocalizations(localizations) ⇒ SlashSubCommands
Section titled “slashSubCommands.setNameLocalizations(localizations) ⇒ SlashSubCommands”Set the localized names of the subcommand.
Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.
| Param | Type | Description |
|---|---|---|
| localizations | Object | The localized names of the subcommand. |
slashSubCommands.setOptions(fn) ⇒ SlashSubCommands
Section titled “slashSubCommands.setOptions(fn) ⇒ SlashSubCommands”Set the options for the subcommand.
Kind: instance method of SlashSubCommands
Returns: SlashSubCommands - The updated SlashSubCommands instance.
| Param | Type | Description |
|---|---|---|
| fn | Object | function | The options for the subcommand. |
slashSubCommands.toJSON() ⇒ Object
Section titled “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.