DiscordLua
discorddiscord
v1.2.4
Install

ModalSubmitInteraction

interaction
On this page

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

interaction Module 1.2.4 Source

Methods

ModalSubmitInteraction:fields()

#

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

Signature

ModalSubmitInteraction:fields()

Parameters

No parameters.

Returns

ModalSubmitInteraction — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ModalSubmitInteraction
object:fields()

ModalSubmitInteraction:getField()

#

Read the Field value from this ModalSubmitInteraction.

Signature

ModalSubmitInteraction:getField(customId, required)

Parameters

NameTypeRequiredBehavior
customId string required Snowflake id string.
required any required Passed through to the implementation as written.

Returns

ModalSubmitInteraction — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ModalSubmitInteraction
object:getField("123", required)

ModalSubmitInteraction:getTextInputValue()

#

Read the TextInputValue value from this ModalSubmitInteraction.

Signature

ModalSubmitInteraction:getTextInputValue(customId, required)

Parameters

NameTypeRequiredBehavior
customId string required Snowflake id string.
required any required Passed through to the implementation as written.

Returns

ModalSubmitInteraction — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ModalSubmitInteraction
object:getTextInputValue("123", required)

ModalSubmitInteraction:launchActivity()

#

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

Signature

ModalSubmitInteraction:launchActivity()

Parameters

No parameters.

Returns

ModalSubmitInteraction — the same instance, for chaining.

Example

lua
local discord = require("discord")
-- object is a ModalSubmitInteraction
object:launchActivity()

ModalSubmitInteraction.transformComponent()

# static

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

Signature

ModalSubmitInteraction.transformComponent(rawComponent, resolved, extra)

Parameters

NameTypeRequiredBehavior
rawComponent any required Passed through to the implementation as written.
resolved any required Passed through to the implementation as written.
extra any optional Passed through to the implementation as written.

Returns

any.

Example

lua
local discord = require("discord")
-- object is a ModalSubmitInteraction
ModalSubmitInteraction.transformComponent(rawComponent, resolved, extra)

Examples

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

AutocompleteInteraction · ButtonInteraction · ChannelSelectMenuInteraction · ChatInputCommandInteraction · ContextMenuCommandInteraction · Interaction · MentionableSelectMenuInteraction · MessageComponentInteraction

Version: discord 1.2.4 · runtime 1.0.0

Search Ctrl K Navigate Open Esc