T

OptionSpec

One declared option, made by an option builder.

type OptionSpec<K extends OptionKind = OptionKind, R extends boolean = boolean, V = OptionValue<K>> = { … }

Members

Carries the handler's value type for inference only; never set at runtime.

readonly choicesReadonly<Record<string, string>> | undefined

Each value from option.choice mapped to its label's message key; undefined for every other builder.

readonly descriptionstring | undefined

The message key of the text the picker shows for the option; undefined shows the option's name.

The option kind; option.choice derives it from its values.

Whether Discord requires the option. Defaults to false; required options are listed first.

The kind-specific settings given to the builder; empty for option.choice.