DiscordLua
discorddiscord
v1.2.9
Install

ContextMenuCommandBuilder

Builder
On this page

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

builder Module 1.2.9 Source

Constructor

ContextMenuCommandBuilder.new(commandType)

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

NameTypeRequiredBehavior
commandType any required Passed through to the implementation as written.
lua
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

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

Returns

ContextMenuCommandBuilder — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ContextMenuCommandBuilder
object:setType(commandType)

Examples

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

ActionRowBuilder · AttachmentBuilder · BaseSelectMenuBuilder · ButtonBuilder · ChannelSelectMenuBuilder · CheckboxBuilder · ComponentBuilder · ContainerBuilder

Version: discord 1.2.9 · runtime 1.0.0

Search Ctrl K Navigate Open Esc