Skip to content

CreateChannelOption

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

Builds a channel command option.

new CreateChannelOption(): CreateChannelOption

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

Creates a channel option.

CreateChannelOption

CreateCommandOption.constructor

addChannelTypes(…types): this

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

Restricts accepted channel types.

…number[]

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