SubcommandOptionBuilder
extends BaseOptionBuilder
Properties
.name
The option name
Type: string | null
.description
The option description
Type: string | null
.type
The option type
Type: number
.options
The subcommand options
Type: RawApplicationCommandOptionData[]
.name_localizations
The option name localizations
Type: { [locale: string]: string }
.description_localizations
The option description localizations
Type: { [locale: string]: string }
Methods
.setName(name)
Set the option name
name
string
none
The option name
Returns: SubcommandOptionBuilder
.setDescription(description)
Set the option description
description
string
none
The option description
Returns: SubcommandOptionBuilder
.addUserOption(fn)
Add the user option
fn
(builder: UserOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.addStringOption(fn)
Add the string option
fn
(builder: StringOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.addIntegerOption(fn)
Add the integer option
fn
(builder: IntegerOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.addBooleanOption(fn)
Add the boolean option
fn
(builder: BooleanOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.addChannelOption(fn)
Add the channel option
fn
(builder: ChannelOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.addRoleOption(fn)
Add the role option
fn
(builder: RoleOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.addMentionableOption(fn)
Add the mentionable option
fn
(builder: MentionableOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.addNumberOption(fn)
Add the number option
fn
(builder: NumberOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.addAttachmentOption(fn)
Add the attachment option
fn
(builder: AttachmentOptionBuilder) => void
none
A function that returns an option builder
Returns: SubcommandOptionBuilder
.setNameLocalizations(localizations)
Set the option name localizations
localizations
s{ [locale: string]: string }
none
The option name localizations
Returns: SubcommandGroupOptionBuilder
.setDescriptionLocalizations(localizations)
Set the option description localizations
localizations
{ [locale: string]: string }
none
The option description localizations
Returns: SubcommandGroupOptionBuilder
.toJSON()
Returns the properties of the class in the object type.
Returns: { [property: string]: any }
Last updated