Skip to content

CreateSubcommand

Defined in: packages/builders/src/commands.ts:347

Builds a nested subcommand.

new CreateSubcommand(): CreateSubcommand

Defined in: packages/builders/src/commands.ts:349

Creates a subcommand.

CreateSubcommand

CreateCommandOption.constructor

addAttachmentOption(configure): this

Defined in: packages/builders/src/commands.ts:401

Adds an attachment option to this subcommand.

(option) => CreateAttachmentOption

this


addBooleanOption(configure): this

Defined in: packages/builders/src/commands.ts:371

Adds a boolean option to this subcommand.

(option) => CreateBooleanOption

this


addChannelOption(configure): this

Defined in: packages/builders/src/commands.ts:383

Adds a channel option to this subcommand.

(option) => CreateChannelOption

this


addIntegerOption(configure): this

Defined in: packages/builders/src/commands.ts:359

Adds an integer option to this subcommand.

(option) => CreateIntegerOption

this


addMentionableOption(configure): this

Defined in: packages/builders/src/commands.ts:395

Adds a mentionable option to this subcommand.

(option) => CreateMentionableOption

this


addNumberOption(configure): this

Defined in: packages/builders/src/commands.ts:365

Adds a number option to this subcommand.

(option) => CreateNumberOption

this


addRoleOption(configure): this

Defined in: packages/builders/src/commands.ts:389

Adds a role option to this subcommand.

(option) => CreateRoleOption

this


addStringOption(configure): this

Defined in: packages/builders/src/commands.ts:353

Adds a string option to this subcommand.

(option) => CreateStringOption

this


addUserOption(configure): this

Defined in: packages/builders/src/commands.ts:377

Adds a user option to this subcommand.

(option) => CreateUserOption

this


setAutocomplete(enabled?): this

Defined in: packages/builders/src/commands.ts:179

Sets autocomplete; options with choices cannot use it.

boolean = true

this

CreateCommandOption.setAutocomplete


setDescription(description): this

Defined in: packages/builders/src/commands.ts:168

Sets the option description.

string

this

CreateCommandOption.setDescription


setName(name): this

Defined in: packages/builders/src/commands.ts:162

Sets the option name.

string

this

CreateCommandOption.setName


setRequired(required?): this

Defined in: packages/builders/src/commands.ts:174

Makes the option required or optional.

boolean = true

this

CreateCommandOption.setRequired


toJSON(): Record<string, unknown>

Defined in: packages/builders/src/commands.ts:190

Serializes the option payload.

Record<string, unknown>

CreateCommandOption.toJSON