ModalSubmitInteraction
interactionOn 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.
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
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
| Name | Type | Required | Behavior |
|---|---|---|---|
customId |
string |
required | Snowflake id string. |
required |
any |
required | Passed through to the implementation as written. |
Returns
ModalSubmitInteraction — the same instance, for chaining.
Example
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
| Name | Type | Required | Behavior |
|---|---|---|---|
customId |
string |
required | Snowflake id string. |
required |
any |
required | Passed through to the implementation as written. |
Returns
ModalSubmitInteraction — the same instance, for chaining.
Example
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
local discord = require("discord")
-- object is a ModalSubmitInteraction
object:launchActivity()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
| Name | Type | Required | Behavior |
|---|---|---|---|
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
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.
Related APIs
AutocompleteInteraction · ButtonInteraction · ChannelSelectMenuInteraction · ChatInputCommandInteraction · ContextMenuCommandInteraction · Interaction · MentionableSelectMenuInteraction · MessageComponentInteraction
Version: discord 1.2.4 · runtime 1.0.0