DiscordLua
discorddiscord
v1.2.9
Install

ApplicationCommandOptionWithChoicesMixin

Class
On this page

ApplicationCommandOptionWithChoicesMixin is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.

class Module 1.2.9 Source

Methods

ApplicationCommandOptionWithChoicesMixin:addChoices()

#

Add Choices to this ApplicationCommandOptionWithChoicesMixin.

Signature

ApplicationCommandOptionWithChoicesMixin:addChoices(...)

Parameters

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

Returns

ApplicationCommandOptionWithChoicesMixin — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ApplicationCommandOptionWithChoicesMixin
object:addChoices(...)

ApplicationCommandOptionWithChoicesMixin:setChoices()

#

Set the Choices field. Builders return this ApplicationCommandOptionWithChoicesMixin so setters can be chained.

Signature

ApplicationCommandOptionWithChoicesMixin:setChoices(...)

Parameters

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

Returns

ApplicationCommandOptionWithChoicesMixin — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ApplicationCommandOptionWithChoicesMixin
object:setChoices(...)

Examples

Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.

ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationCommandNumericOptionMinMaxValueMixin · ApplicationCommandOptionBase

Version: discord 1.2.9 · runtime 1.0.0

Search Ctrl K Navigate Open Esc