ActionRowBuilder
BuilderOn this page
ActionRowBuilder is a fluent payload builder. Chain setters, then pass the builder to send, reply, or command registration.
Constructor
ActionRowBuilder.new() The class table is callable, so ActionRowBuilder() is the same as .new.
No parameters.
local discord = require("discord")
local object = discord.ActionRowBuilder()Properties
- Name
data- Type
any- Access
- readonly
- Description
- Instance field
ActionRowBuilder.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 ActionRowBuilder.
Methods
ActionRowBuilder:addComponents()
#Add Components to this ActionRowBuilder.
Signature
ActionRowBuilder:addComponents(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
ActionRowBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ActionRowBuilder
object:addComponents(...)Performs from on this ActionRowBuilder. Call it from bot code when you need that operation on the current object.
Signature
ActionRowBuilder.from(data) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
data |
any |
required | Passed through to the implementation as written. |
Returns
ActionRowBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ActionRowBuilder
ActionRowBuilder.from(data)ActionRowBuilder:setComponents()
#Set the Components field. Builders return this ActionRowBuilder so setters can be chained.
Signature
ActionRowBuilder:setComponents(...) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
... |
any |
required | Passed through to the implementation as written. |
Returns
ActionRowBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ActionRowBuilder
object:setComponents(...)ActionRowBuilder:toJSON()
#Serialize this ActionRowBuilder into a Lua table suitable for REST or debugging.
Signature
ActionRowBuilder:toJSON() Parameters
No parameters.
Returns
ActionRowBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ActionRowBuilder
object:toJSON()Examples
local discord = require("discord")
local object = discord.ActionRowBuilder({})Related APIs
AttachmentBuilder · ButtonBuilder · ChannelSelectMenuBuilder · CheckboxBuilder · ContainerBuilder · ContextMenuCommandBuilder · EmbedBuilder · FileBuilder
Version: discord 1.2.4 · runtime 1.0.0