StringSelectMenu

Represents a Select Menu for selecting string options.

Signature

export declare class StringSelectMenu<Value extends string = string> extends SelectMenu<APIStringSelectComponent<Value>>

Private types

StringSelectOptionResolvableTypeAlias
type StringSelectOptionResolvable<Value extends string = string> = StringSelectOption | APISelectMenuOption<Value>;
JSDoc
Examples
const stringSelectMenu = new StringSelectMenu();
stringSelectMenu.setCustomId("string-select");
stringSelectMenu.addOption(new StringSelectOption().setLabel("Option 1").setValue("option_1"));
stringSelectMenu.setOptions([
  { label: "Option 2", value: "option_2" },
  { label: "Option 3", value: "option_3" },
]);

Properties

Methods

setRequired(required?: boolean): this;

Sets whether the string select is required to answer in a modal.

Parameters
required
Whether the string select is required to answer in a modal.
Returns

The current StringSelectMenu instance.