StringSelectMenuBuilder
BuilderOn this page
StringSelectMenuBuilder is a fluent payload builder. Chain setters, then pass the builder to send, reply, or command registration.
Constructor
StringSelectMenuBuilder.new(selectType) The class table is callable, so StringSelectMenuBuilder(selectType) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
selectType |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.StringSelectMenuBuilder({})Methods
StringSelectMenuBuilder:addOptions()
#Add Options to this StringSelectMenuBuilder.
Signature
StringSelectMenuBuilder:addOptions(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuBuilder — the same instance, for chaining.
Throws
A DiscordLua error when arguments are invalid or the request fails without a callback.
Example
local discord = require("discord")
-- object is a StringSelectMenuBuilder
object:addOptions(...)Performs from on this StringSelectMenuBuilder. Call it from bot code when you need that operation on the current object.
Signature
StringSelectMenuBuilder.from(data) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
data |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuBuilder
StringSelectMenuBuilder.from(data)StringSelectMenuBuilder:setOptions()
#Set the Options field. Builders return this StringSelectMenuBuilder so setters can be chained.
Signature
StringSelectMenuBuilder:setOptions(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuBuilder
object:setOptions(...)StringSelectMenuBuilder:spliceOptions()
#Performs splice options on this StringSelectMenuBuilder. Call it from bot code when you need that operation on the current object.
Signature
StringSelectMenuBuilder:spliceOptions(index, deleteCount, ...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
index |
any |
required | Passed through to the implementation as written. |
deleteCount |
any |
required | Passed through to the implementation as written. |
... |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuBuilder
object:spliceOptions(index, deleteCount, ...)Examples
local discord = require("discord")
local object = discord.StringSelectMenuBuilder({})Related APIs
ActionRowBuilder · AttachmentBuilder · BaseSelectMenuBuilder · ButtonBuilder · ChannelSelectMenuBuilder · CheckboxBuilder · ComponentBuilder · ContainerBuilder
Version: discord 1.2.9 · runtime 1.0.0