DiscordLua
discorddiscord
v1.2.9
Install

StringSelectMenuBuilder

Builder
On this page

StringSelectMenuBuilder is a fluent payload builder. Chain setters, then pass the builder to send, reply, or command registration.

builder Module 1.2.9 Source

Constructor

StringSelectMenuBuilder.new(selectType)

The class table is callable, so StringSelectMenuBuilder(selectType) is the same as .new.

NameTypeRequiredBehavior
selectType any required Passed through to the implementation as written.
lua
local discord = require("discord")
local object = discord.StringSelectMenuBuilder({})

Methods

StringSelectMenuBuilder:addOptions()

#

Add Options to this StringSelectMenuBuilder.

Signature

StringSelectMenuBuilder:addOptions(...)

Parameters

NameTypeRequiredBehavior
... 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

lua
local discord = require("discord")
-- object is a StringSelectMenuBuilder
object:addOptions(...)

StringSelectMenuBuilder.from()

# static

Performs from on this StringSelectMenuBuilder. Call it from bot code when you need that operation on the current object.

Signature

StringSelectMenuBuilder.from(data)

Parameters

NameTypeRequiredBehavior
data any required Passed through to the implementation as written.

Returns

StringSelectMenuBuilder — the same instance, for chaining.

Example

lua
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

NameTypeRequiredBehavior
... any required Passed through to the implementation as written.

Returns

StringSelectMenuBuilder — the same instance, for chaining.

Example

lua
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

NameTypeRequiredBehavior
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

lua
local discord = require("discord")
-- object is a StringSelectMenuBuilder
object:spliceOptions(index, deleteCount, ...)

Examples

lua
local discord = require("discord")
local object = discord.StringSelectMenuBuilder({})

ActionRowBuilder · AttachmentBuilder · BaseSelectMenuBuilder · ButtonBuilder · ChannelSelectMenuBuilder · CheckboxBuilder · ComponentBuilder · ContainerBuilder

Version: discord 1.2.9 · runtime 1.0.0

Search Ctrl K Navigate Open Esc