OptionConfig
OptionConfig<
T,R,C> =object&OptionLimits<T> &object
Defined in: option.ts:24
Type Parameters
Section titled “Type Parameters”T extends keyof OptionValue
R extends boolean
C
Type Declaration
Section titled “Type Declaration”choices?
Section titled “choices?”
optionalchoices?:C
The only values the user can pick, keyed by the label Discord shows. For a string, integer
or number option.
description
Section titled “description”description:
string
The text Discord shows under the option name.
locales?
Section titled “locales?”
optionallocales?:Locales
The name and description in other languages, keyed by Discord locale.
required?
Section titled “required?”
optionalrequired?:R
Whether the user must fill it in. Defaults to false.
autocomplete?
Section titled “autocomplete?”
optionalautocomplete?: [Choice<T>] extends [never] ?never: [C] extends [never] ? (c) =>Suggestion<Choice<T>>[] |Promise<Suggestion<Choice<T>>[]> :never
Suggests values as the user types, instead of fixed choices. Gets what the user has typed
so far as c.value and returns up to 25 suggestions, as plain values or as { name, value }.