StringSelectMenuOptionBuilder
BuilderOn this page
StringSelectMenuOptionBuilder is a fluent payload builder. Chain setters, then pass the builder to send, reply, or command registration.
Constructor
StringSelectMenuOptionBuilder.new(data) The class table is callable, so StringSelectMenuOptionBuilder(data) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
data |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.StringSelectMenuOptionBuilder({})Properties
- Name
data- Type
any- Access
- readonly
- Description
- Instance field
StringSelectMenuOptionBuilder.data. Read it after the object is constructed or wrapped from Gateway/REST data. - Availability
- Populated from the Gateway/REST payload or constructor for this StringSelectMenuOptionBuilder.
Methods
Performs from on this StringSelectMenuOptionBuilder. Call it from bot code when you need that operation on the current object.
Signature
StringSelectMenuOptionBuilder.from(data) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
data |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuOptionBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuOptionBuilder
StringSelectMenuOptionBuilder.from(data)StringSelectMenuOptionBuilder:setDefault()
#Set the Default field. Builders return this StringSelectMenuOptionBuilder so setters can be chained.
Signature
StringSelectMenuOptionBuilder:setDefault(isDefault) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
isDefault |
any |
optional | Passed through to the implementation as written. |
Returns
StringSelectMenuOptionBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuOptionBuilder
object:setDefault(isDefault)StringSelectMenuOptionBuilder:setDescription()
#Set the Description field. Builders return this StringSelectMenuOptionBuilder so setters can be chained.
Signature
StringSelectMenuOptionBuilder:setDescription(description) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
description |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuOptionBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuOptionBuilder
object:setDescription(description)StringSelectMenuOptionBuilder:setEmoji()
#Set the Emoji field. Builders return this StringSelectMenuOptionBuilder so setters can be chained.
Signature
StringSelectMenuOptionBuilder:setEmoji(emoji) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
emoji |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuOptionBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuOptionBuilder
object:setEmoji(emoji)StringSelectMenuOptionBuilder:setLabel()
#Set the Label field. Builders return this StringSelectMenuOptionBuilder so setters can be chained.
Signature
StringSelectMenuOptionBuilder:setLabel(label) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
label |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuOptionBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuOptionBuilder
object:setLabel(label)StringSelectMenuOptionBuilder:setValue()
#Set the Value field. Builders return this StringSelectMenuOptionBuilder so setters can be chained.
Signature
StringSelectMenuOptionBuilder:setValue(value) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
value |
any |
required | Passed through to the implementation as written. |
Returns
StringSelectMenuOptionBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuOptionBuilder
object:setValue(value)StringSelectMenuOptionBuilder:toJSON()
#Serialize this StringSelectMenuOptionBuilder into a Lua table suitable for REST or debugging.
Signature
StringSelectMenuOptionBuilder:toJSON() Parameters
No parameters.
Returns
StringSelectMenuOptionBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a StringSelectMenuOptionBuilder
object:toJSON()Examples
local discord = require("discord")
local object = discord.StringSelectMenuOptionBuilder({})Related APIs
ActionRowBuilder · AttachmentBuilder · BaseSelectMenuBuilder · ButtonBuilder · ChannelSelectMenuBuilder · CheckboxBuilder · ComponentBuilder · ContainerBuilder
Version: discord 1.2.9 · runtime 1.0.0