Skip to content

Defined in: sdk/js/src/builders/options.ts:27

One value option (used through addStringOption(o => …) and friends).

new OptionBuilder(type): OptionBuilder

Defined in: sdk/js/src/builders/options.ts:41

ApplicationCommandOptionType

OptionBuilder

description: string = ''

Defined in: sdk/js/src/builders/options.ts:29


name: string = ''

Defined in: sdk/js/src/builders/options.ts:28


required: boolean = false

Defined in: sdk/js/src/builders/options.ts:30


readonly type: ApplicationCommandOptionType

Defined in: sdk/js/src/builders/options.ts:41

addChannelTypes(…kinds): this

Defined in: sdk/js/src/builders/options.ts:71

Channel kinds offered (channel options).

…string[]

this


addChoices(…choices): this

Defined in: sdk/js/src/builders/options.ts:64

Fixed choices (string, integer and number options).

…object[]

this


setAutocomplete(autocomplete?): this

Defined in: sdk/js/src/builders/options.ts:92

Suggest values as the invoker types (bot.on('autocomplete')); not with choices.

boolean = true

this


setDescription(description): this

Defined in: sdk/js/src/builders/options.ts:47

string

this


setDescriptionLocalizations(map): this

Defined in: sdk/js/src/builders/options.ts:59

Record<string, string>

this


setMaxLength(n): this

Defined in: sdk/js/src/builders/options.ts:87

number

this


setMaxValue(n): this

Defined in: sdk/js/src/builders/options.ts:79

number

this


setMinLength(n): this

Defined in: sdk/js/src/builders/options.ts:83

number

this


setMinValue(n): this

Defined in: sdk/js/src/builders/options.ts:75

number

this


setName(name): this

Defined in: sdk/js/src/builders/options.ts:43

string

this


setNameLocalizations(map): this

Defined in: sdk/js/src/builders/options.ts:55

Record<string, string>

this


setRequired(required?): this

Defined in: sdk/js/src/builders/options.ts:51

boolean = true

this


toWit(): CommandOption

Defined in: sdk/js/src/builders/options.ts:110

CommandOption