🪟
Form submitted
modalSubmitINTERACTION_CREATE (MODAL_SUBMIT)TriggerFires when someone submits a pop-up form. Each answer arrives as {{form.values.<field custom id>}}. Works in Interaction Only mode.
On the canvas
This is what the trigger looks like in your bot's Triggers tab. The sparks listed are available in every node inside the linked flow.
🪟Trigger
Form submitted
modalSubmitSparks in this flow
{{input.guild.id}}Your Discord server's unique ID{{input.guild.name}}Your server's name{{input.guild.memberCount}}How many members are in the server{{form.customId}}Custom id of the form that was submitted{{form.args}}Anything after the colon in the form's custom id{{component.user.id}}Discord ID of whoever submitted the form{{component.user.username}}Username of whoever submitted the form{{component.channelId}}Channel the form was opened fromAvailable sparks
Use these in any piece config field inside flows triggered by this event.
| Spark | Type | Description |
|---|---|---|
{{input.guild.id}} | string | Your Discord server's unique ID |
{{input.guild.name}} | string | Your server's name |
{{input.guild.memberCount}} | string | How many members are in the server |
{{form.customId}} | string | Custom id of the form that was submitted |
{{form.args}} | string | Anything after the colon in the form's custom id |
{{component.user.id}} | string | Discord ID of whoever submitted the form |
{{component.user.username}} | string | Username of whoever submitted the form |
{{component.channelId}} | string | Channel the form was opened from |
📐
In TypeScript, this would be…
Not something you need to write — Kitcord registers these listeners automatically from your Kit.
TypeScript
client.on("modalSubmit", () => { /* your flow */ });