Modal Submit

Triggers when a form/modal is submitted.

This trigger is based on Discord event InteractionCreate.

Inputs

Inputs have not yet been documented.

Outputs

Interaction ID

Interaction Token

Server ID

Channel ID

Executing User ID

Context Type

App Permissions

\

More Information

While different from dropdowns and modals, Modals have a unique and useful place in any Inventor’s arsenal. They are useful for getting user feedback and allowing users to send messages (example for a /say command below)

Just like the Button Click trigger, Modal Submit supports prefixing meaning you can have multiple modals trigger the same flow but do different actions or use the flow to pass information through to another flow or process data from other flows in the modal submit flow.

Learn more about prefixing in the Button Click trigger

Example

This example will show you how to make a /say command but only the Modal Submit part. This example assumes a modal with one field and the ID of “`slash-say`”

The image above shows a Modal Submit trigger with an ID of slash-say

A modal on screen has the Field 1 set as Enter text to repeat prompting user to enter the text they want to bot to repeat

Upon submission of the modal, a Modal Submit event is triggered with Modal Field 1 Value being the text the user entered. You can take this data and directly place it into a Send or Edit Text Message block to send the user’s message as the bot

The above image shows a Send or Edit Message block being used in the Modal Submit trigger

Now that you have the bot sending the user’s message, all that’s left is adding a reply and you’re all set on your way to being a professional Inventor