Skip to content

SelectMenuBuilder

It’s a class that allows you to build a SelectMenu object that can be sent to Discord

Kind: global class

The type of the SelectMenu

Kind: instance property of SelectMenuBuilder
Default: 3

The custom ID of the SelectMenu

Kind: instance property of SelectMenuBuilder
Default: “null”

The placeholder text of the SelectMenu

Kind: instance property of SelectMenuBuilder
Default: “null”

selectMenuBuilder.options : Array.<Object>

Section titled “selectMenuBuilder.options : Array.<Object>”

The options of the SelectMenu

Kind: instance property of SelectMenuBuilder
Default: []

The minimum number of options that can be selected in the SelectMenu

Kind: instance property of SelectMenuBuilder
Default: null

The maximum number of options that can be selected in the SelectMenu

Kind: instance property of SelectMenuBuilder
Default: null

Whether the SelectMenu is disabled or not

Kind: instance property of SelectMenuBuilder
Default: false

Set the custom ID of the SelectMenu

Kind: instance method of SelectMenuBuilder

ParamTypeDescription
customIdstringThe custom ID to set

Set the placeholder text of the SelectMenu

Kind: instance method of SelectMenuBuilder

ParamTypeDescription
placeholderstringThe placeholder text to set

Add an option to the SelectMenu

Kind: instance method of SelectMenuBuilder

ParamTypeDefaultDescription
labelstringThe label text of the option
valuestringThe value of the option
[description]stringnullThe description of the option
[emoji]stringnullThe emoji of the option

Set the minimum number of options that can be selected in the SelectMenu

Kind: instance method of SelectMenuBuilder

ParamTypeDescription
minValuesnumberThe minimum number of options to set

Set the maximum number of options that can be selected in the SelectMenu

Kind: instance method of SelectMenuBuilder

ParamTypeDescription
maxValuesnumberThe maximum number of options to set

Set whether the SelectMenu is disabled or not

Kind: instance method of SelectMenuBuilder

ParamTypeDescription
disabledbooleanWhether the SelectMenu is disabled or not

Build the SelectMenu object

Kind: instance method of SelectMenuBuilder
Returns: Object - The SelectMenu object that can be sent to Discord