CreateSubcommand
Defined in: packages/builders/src/commands.ts:347
Builds a nested subcommand.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CreateSubcommand():
CreateSubcommand
Defined in: packages/builders/src/commands.ts:349
Creates a subcommand.
Returns
Section titled “Returns”CreateSubcommand
Overrides
Section titled “Overrides”CreateCommandOption.constructor
Methods
Section titled “Methods”addAttachmentOption()
Section titled “addAttachmentOption()”addAttachmentOption(
configure):this
Defined in: packages/builders/src/commands.ts:401
Adds an attachment option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateAttachmentOption
Returns
Section titled “Returns”this
addBooleanOption()
Section titled “addBooleanOption()”addBooleanOption(
configure):this
Defined in: packages/builders/src/commands.ts:371
Adds a boolean option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateBooleanOption
Returns
Section titled “Returns”this
addChannelOption()
Section titled “addChannelOption()”addChannelOption(
configure):this
Defined in: packages/builders/src/commands.ts:383
Adds a channel option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateChannelOption
Returns
Section titled “Returns”this
addIntegerOption()
Section titled “addIntegerOption()”addIntegerOption(
configure):this
Defined in: packages/builders/src/commands.ts:359
Adds an integer option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateIntegerOption
Returns
Section titled “Returns”this
addMentionableOption()
Section titled “addMentionableOption()”addMentionableOption(
configure):this
Defined in: packages/builders/src/commands.ts:395
Adds a mentionable option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateMentionableOption
Returns
Section titled “Returns”this
addNumberOption()
Section titled “addNumberOption()”addNumberOption(
configure):this
Defined in: packages/builders/src/commands.ts:365
Adds a number option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateNumberOption
Returns
Section titled “Returns”this
addRoleOption()
Section titled “addRoleOption()”addRoleOption(
configure):this
Defined in: packages/builders/src/commands.ts:389
Adds a role option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateRoleOption
Returns
Section titled “Returns”this
addStringOption()
Section titled “addStringOption()”addStringOption(
configure):this
Defined in: packages/builders/src/commands.ts:353
Adds a string option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateStringOption
Returns
Section titled “Returns”this
addUserOption()
Section titled “addUserOption()”addUserOption(
configure):this
Defined in: packages/builders/src/commands.ts:377
Adds a user option to this subcommand.
Parameters
Section titled “Parameters”configure
Section titled “configure”(option) => CreateUserOption
Returns
Section titled “Returns”this
setAutocomplete()
Section titled “setAutocomplete()”setAutocomplete(
enabled?):this
Defined in: packages/builders/src/commands.ts:179
Sets autocomplete; options with choices cannot use it.
Parameters
Section titled “Parameters”enabled?
Section titled “enabled?”boolean = true
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”CreateCommandOption.setAutocomplete
setDescription()
Section titled “setDescription()”setDescription(
description):this
Defined in: packages/builders/src/commands.ts:168
Sets the option description.
Parameters
Section titled “Parameters”description
Section titled “description”string
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”CreateCommandOption.setDescription
setName()
Section titled “setName()”setName(
name):this
Defined in: packages/builders/src/commands.ts:162
Sets the option name.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”setRequired()
Section titled “setRequired()”setRequired(
required?):this
Defined in: packages/builders/src/commands.ts:174
Makes the option required or optional.
Parameters
Section titled “Parameters”required?
Section titled “required?”boolean = true
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”CreateCommandOption.setRequired
toJSON()
Section titled “toJSON()”toJSON():
Record<string,unknown>
Defined in: packages/builders/src/commands.ts:190
Serializes the option payload.
Returns
Section titled “Returns”Record<string, unknown>