K
Docs
API ReferenceEvent TypesDropdown chosen
🔽

Dropdown chosen

selectChooseINTERACTION_CREATE (MESSAGE_COMPONENT)Trigger

Fires when someone picks from a dropdown your bot sent. What they picked arrives as {{component.value}}. 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.

🔽
Dropdown chosen
selectChoose
Trigger
Sparks 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 in
{{component.value}}The chosen value — the bit before the | on that line of your dropdown
{{component.values}}Every chosen value, when the dropdown allows more than one

Available sparks

Use these in any piece config field inside flows triggered by this event.

SparkTypeDescription
{{input.guild.id}}stringYour Discord server's unique ID
{{input.guild.name}}stringYour server's name
{{input.guild.memberCount}}stringHow many members are in the server
{{component.customId}}stringThe custom id of the button or dropdown that was used
{{component.args}}stringAnything after the colon in the custom id — how you carry data through a click
{{component.user.id}}stringDiscord ID of whoever clicked
{{component.user.username}}stringUsername of whoever clicked
{{component.messageId}}stringID of the message the button is on
{{component.channelId}}stringID of the channel the message is in
{{component.value}}stringThe chosen value — the bit before the | on that line of your dropdown
{{component.values}}arrayEvery chosen value, when the dropdown allows more than one
📐

In TypeScript, this would be…

Not something you need to write — Kitcord registers these listeners automatically from your Kit.

TypeScript
client.on("selectChoose", () => { /* your flow */ });