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