SelectMenu
Implementation of the Discord SelectMenu class in Luau
Summary
Properties
SelectMenu.type :: numberSelectMenu.customId :: stringSelectMenu.options :: {Classes.Option}?SelectMenu.apiTypes :: {api_types.ChannelType}?SelectMenu.placeholder :: string?SelectMenu.defaultValues :: {Classes.Message.SelectMenuDefaultValue}?SelectMenu.minValues :: number?SelectMenu.maxValues :: number?SelectMenu.disabled :: boolean?Properties
Section titled “Properties”The type of select menu component. This will be a number that represents the type of select menu.
customId
Section titled “customId”A developer-defined identifier for the select menu, max 100 characters.
options
Section titled “options”Array of select menu options that users can choose from. Maximum of 25 items.
apiTypes
Section titled “apiTypes”List of channel types to include in the select menu. Only applicable for channel select menus.
placeholder
Section titled “placeholder”Custom placeholder text shown when no option is selected, max 150 characters.
defaultValues
Section titled “defaultValues”Array of default values for auto-populated select menus.
minValues
Section titled “minValues”The minimum number of items that must be chosen. Default 1, min 0, max 25.
maxValues
Section titled “maxValues”The maximum number of items that can be chosen. Default 1, max 25.
disabled
Section titled “disabled”Whether this select menu is disabled. Defaults to false if not set.
Methods
Section titled “Methods”SelectMenu : sync ( selectMenuData ) -> ()
Responsible for syncing data to this select menu object. This is typically called by the API when this object is created or updated.
Parameters
| selectMenuData: SelectMenuComponentObject |
Functions
Section titled “Functions”SelectMenu . new ( selectMenuData ) -> SelectMenu
Responsible for constructing this class.
Parameters
| selectMenuData: SelectMenuComponentObject |
Returns
| SelectMenu |