DiscordLua
discorddiscord
v1.2.4
Install

ActionRowBuilder

Builder
On this page

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

builder Module 1.2.4 Source

Constructor

ActionRowBuilder.new()

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

No parameters.

lua
local discord = require("discord")
local object = discord.ActionRowBuilder()

Properties

ActionRowBuilder.data

# readonly
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

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

Returns

ActionRowBuilder — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ActionRowBuilder
object:addComponents(...)

ActionRowBuilder.from()

# static

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

Signature

ActionRowBuilder.from(data)

Parameters

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

Returns

ActionRowBuilder — the same instance, for chaining.

Example

lua
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

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

Returns

ActionRowBuilder — the same instance, for chaining.

Example

lua
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

lua
local discord = require("discord")
-- object is a ActionRowBuilder
object:toJSON()

Examples

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

AttachmentBuilder · ButtonBuilder · ChannelSelectMenuBuilder · CheckboxBuilder · ContainerBuilder · ContextMenuCommandBuilder · EmbedBuilder · FileBuilder

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc