OptionBuilder
Defined in: sdk/js/src/builders/options.ts:27
One value option (used through addStringOption(o => …) and friends).
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new OptionBuilder(
type):OptionBuilder
Defined in: sdk/js/src/builders/options.ts:41
Parameters
Section titled “Parameters”Returns
Section titled “Returns”OptionBuilder
Properties
Section titled “Properties”description
Section titled “description”description:
string=''
Defined in: sdk/js/src/builders/options.ts:29
name:
string=''
Defined in: sdk/js/src/builders/options.ts:28
required
Section titled “required”required:
boolean=false
Defined in: sdk/js/src/builders/options.ts:30
readonlytype:ApplicationCommandOptionType
Defined in: sdk/js/src/builders/options.ts:41
Methods
Section titled “Methods”addChannelTypes()
Section titled “addChannelTypes()”addChannelTypes(…
kinds):this
Defined in: sdk/js/src/builders/options.ts:71
Channel kinds offered (channel options).
Parameters
Section titled “Parameters”…string[]
Returns
Section titled “Returns”this
addChoices()
Section titled “addChoices()”addChoices(…
choices):this
Defined in: sdk/js/src/builders/options.ts:64
Fixed choices (string, integer and number options).
Parameters
Section titled “Parameters”choices
Section titled “choices”…object[]
Returns
Section titled “Returns”this
setAutocomplete()
Section titled “setAutocomplete()”setAutocomplete(
autocomplete?):this
Defined in: sdk/js/src/builders/options.ts:92
Suggest values as the invoker types (bot.on('autocomplete')); not with choices.
Parameters
Section titled “Parameters”autocomplete?
Section titled “autocomplete?”boolean = true
Returns
Section titled “Returns”this
setDescription()
Section titled “setDescription()”setDescription(
description):this
Defined in: sdk/js/src/builders/options.ts:47
Parameters
Section titled “Parameters”description
Section titled “description”string
Returns
Section titled “Returns”this
setDescriptionLocalizations()
Section titled “setDescriptionLocalizations()”setDescriptionLocalizations(
map):this
Defined in: sdk/js/src/builders/options.ts:59
Parameters
Section titled “Parameters”Record<string, string>
Returns
Section titled “Returns”this
setMaxLength()
Section titled “setMaxLength()”setMaxLength(
n):this
Defined in: sdk/js/src/builders/options.ts:87
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
setMaxValue()
Section titled “setMaxValue()”setMaxValue(
n):this
Defined in: sdk/js/src/builders/options.ts:79
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
setMinLength()
Section titled “setMinLength()”setMinLength(
n):this
Defined in: sdk/js/src/builders/options.ts:83
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
setMinValue()
Section titled “setMinValue()”setMinValue(
n):this
Defined in: sdk/js/src/builders/options.ts:75
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
setName()
Section titled “setName()”setName(
name):this
Defined in: sdk/js/src/builders/options.ts:43
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
setNameLocalizations()
Section titled “setNameLocalizations()”setNameLocalizations(
map):this
Defined in: sdk/js/src/builders/options.ts:55
Parameters
Section titled “Parameters”Record<string, string>
Returns
Section titled “Returns”this
setRequired()
Section titled “setRequired()”setRequired(
required?):this
Defined in: sdk/js/src/builders/options.ts:51
Parameters
Section titled “Parameters”required?
Section titled “required?”boolean = true
Returns
Section titled “Returns”this
toWit()
Section titled “toWit()”toWit():
CommandOption
Defined in: sdk/js/src/builders/options.ts:110
Returns
Section titled “Returns”CommandOption