Skip to content

CreateCommandOption

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

Base builder for command options.

new CreateCommandOption(type): CreateCommandOption

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

Creates an option builder.

number

CreateCommandOption

setAutocomplete(enabled?): this

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

Sets autocomplete; options with choices cannot use it.

boolean = true

this


setDescription(description): this

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

Sets the option description.

string

this


setName(name): this

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

Sets the option name.

string

this


setRequired(required?): this

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

Makes the option required or optional.

boolean = true

this


toJSON(): Record<string, unknown>

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

Serializes the option payload.

Record<string, unknown>