ContextMenuCommandBuilder
BuilderOn this page
ContextMenuCommandBuilder is a fluent payload builder. Chain setters, then pass the builder to send, reply, or command registration.
Constructor
ContextMenuCommandBuilder.new(commandType) The class table is callable, so ContextMenuCommandBuilder(commandType) is the same as .new.
| Name | Type | Required | Behavior |
|---|---|---|---|
commandType |
any |
required | Passed through to the implementation as written. |
local discord = require("discord")
local object = discord.ContextMenuCommandBuilder({})Methods
ContextMenuCommandBuilder:setType()
#Set the Type field. Builders return this ContextMenuCommandBuilder so setters can be chained.
Signature
ContextMenuCommandBuilder:setType(commandType) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
commandType |
any |
required | Passed through to the implementation as written. |
Returns
ContextMenuCommandBuilder — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a ContextMenuCommandBuilder
object:setType(commandType)Examples
local discord = require("discord")
local object = discord.ContextMenuCommandBuilder({})Related APIs
ActionRowBuilder · AttachmentBuilder · BaseSelectMenuBuilder · ButtonBuilder · ChannelSelectMenuBuilder · CheckboxBuilder · ComponentBuilder · ContainerBuilder
Version: discord 1.2.9 · runtime 1.0.0