SelectMenuBuilder
SelectMenuBuilder
It’s a class that allows you to build a SelectMenu object that can be sent to Discord
Kind: global class
- SelectMenuBuilder
- .type :
number
- .custom_id :
string
- .placeholder :
string
- .options :
Array.<Object>
- .min_values :
number
- .max_values :
number
- .disabled :
boolean
- .setCustomId(customId) ⇒
SelectMenuBuilder
- .setPlaceholder(placeholder) ⇒
SelectMenuBuilder
- .addOption(label, value, [description], [emoji]) ⇒
SelectMenuBuilder
- .setMinValues(minValues) ⇒
SelectMenuBuilder
- .setMaxValues(maxValues) ⇒
SelectMenuBuilder
- .setDisabled(disabled) ⇒
SelectMenuBuilder
- .build() ⇒
Object
- .type :
selectMenuBuilder.type : number
The type of the SelectMenu
Kind: instance property of SelectMenuBuilder
Default: 3
selectMenuBuilder.custom_id : string
The custom ID of the SelectMenu
Kind: instance property of SelectMenuBuilder
Default: “null”
selectMenuBuilder.placeholder : string
The placeholder text of the SelectMenu
Kind: instance property of SelectMenuBuilder
Default: “null”
selectMenuBuilder.options : Array.<Object>
The options of the SelectMenu
Kind: instance property of SelectMenuBuilder
Default: []
selectMenuBuilder.min_values : number
The minimum number of options that can be selected in the SelectMenu
Kind: instance property of SelectMenuBuilder
Default: null
selectMenuBuilder.max_values : number
The maximum number of options that can be selected in the SelectMenu
Kind: instance property of SelectMenuBuilder
Default: null
selectMenuBuilder.disabled : boolean
Whether the SelectMenu is disabled or not
Kind: instance property of SelectMenuBuilder
Default: false
selectMenuBuilder.setCustomId(customId) ⇒ SelectMenuBuilder
Set the custom ID of the SelectMenu
Kind: instance method of SelectMenuBuilder
Param | Type | Description |
---|---|---|
customId | string | The custom ID to set |
selectMenuBuilder.setPlaceholder(placeholder) ⇒ SelectMenuBuilder
Set the placeholder text of the SelectMenu
Kind: instance method of SelectMenuBuilder
Param | Type | Description |
---|---|---|
placeholder | string | The placeholder text to set |
selectMenuBuilder.addOption(label, value, [description], [emoji]) ⇒ SelectMenuBuilder
Add an option to the SelectMenu
Kind: instance method of SelectMenuBuilder
Param | Type | Default | Description |
---|---|---|---|
label | string | The label text of the option | |
value | string | The value of the option | |
[description] | string | null | The description of the option |
[emoji] | string | null | The emoji of the option |
selectMenuBuilder.setMinValues(minValues) ⇒ SelectMenuBuilder
Set the minimum number of options that can be selected in the SelectMenu
Kind: instance method of SelectMenuBuilder
Param | Type | Description |
---|---|---|
minValues | number | The minimum number of options to set |
selectMenuBuilder.setMaxValues(maxValues) ⇒ SelectMenuBuilder
Set the maximum number of options that can be selected in the SelectMenu
Kind: instance method of SelectMenuBuilder
Param | Type | Description |
---|---|---|
maxValues | number | The maximum number of options to set |
selectMenuBuilder.setDisabled(disabled) ⇒ SelectMenuBuilder
Set whether the SelectMenu is disabled or not
Kind: instance method of SelectMenuBuilder
Param | Type | Description |
---|---|---|
disabled | boolean | Whether the SelectMenu is disabled or not |
selectMenuBuilder.build() ⇒ Object
Build the SelectMenu object
Kind: instance method of SelectMenuBuilder
Returns: Object
- The SelectMenu object that can be sent to Discord