🔘
Button pressed
componentClickINTERACTION_CREATE (MESSAGE_COMPONENT)TriggerFires when someone presses a button your bot sent. Match it to the button's 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
Button pressed
componentClickSparks 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{{component.customId}}The custom id of the button or dropdown that was used{{component.args}}Anything after the colon in the custom id — how you carry data through a click{{component.user.id}}Discord ID of whoever clicked{{component.user.username}}Username of whoever clicked{{component.messageId}}ID of the message the button is on{{component.channelId}}ID of the channel the message is inAvailable 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 |
{{component.customId}} | string | The custom id of the button or dropdown that was used |
{{component.args}} | string | Anything after the colon in the custom id — how you carry data through a click |
{{component.user.id}} | string | Discord ID of whoever clicked |
{{component.user.username}} | string | Username of whoever clicked |
{{component.messageId}} | string | ID of the message the button is on |
{{component.channelId}} | string | ID of the channel the message is in |
📐
In TypeScript, this would be…
Not something you need to write — Kitcord registers these listeners automatically from your Kit.
TypeScript
client.on("componentClick", () => { /* your flow */ });