⚡
Interaction received
interactionCreateINTERACTION_CREATETriggerFires when a Discord interaction is received (slash commands use Spells instead).
When to use this
- →Non-slash interactions (buttons, menus) if wired in future flows
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
Interaction received
interactionCreateSparks 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{{interaction.user.id}}Discord ID of who triggered the interaction{{interaction.user.username}}Username of the person who triggered the interaction{{interaction.channelId}}ID of the channel the interaction came from{{interaction.type}}Interaction type (ChatInputCommand, Button, SelectMenu, etc.)Available 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 |
{{interaction.user.id}} | string | Discord ID of who triggered the interaction |
{{interaction.user.username}} | string | Username of the person who triggered the interaction |
{{interaction.channelId}} | string | ID of the channel the interaction came from |
{{interaction.type}} | string | Interaction type (ChatInputCommand, Button, SelectMenu, etc.) |
📐
In TypeScript, this would be…
Not something you need to write — Kitcord registers these listeners automatically from your Kit.
TypeScript
client.on("interactionCreate", (interaction) => {
// {{interaction.user.id}}, {{interaction.type}}
});