🎙️
Voice state changes
voiceStateUpdateVOICE_STATE_UPDATETriggerFires when a member joins, leaves, or moves voice channels.
When to use this
- →Voice join/leave logging
- →Auto-move or channel stats
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
Voice state changes
voiceStateUpdateSparks 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{{voice.userId}}Discord ID of the user who changed voice state{{voice.channelId}}Voice channel ID (empty string if they left){{voice.joined}}True when the user joined a voice channel{{voice.left}}True when the user left a voice channelAvailable 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 |
{{voice.userId}} | string | Discord ID of the user who changed voice state |
{{voice.channelId}} | string | Voice channel ID (empty string if they left) |
{{voice.joined}} | boolean | True when the user joined a voice channel |
{{voice.left}} | boolean | True when the user left a voice channel |
📐
In TypeScript, this would be…
Not something you need to write — Kitcord registers these listeners automatically from your Kit.
TypeScript
client.on("voiceStateUpdate", (oldState, newState) => {
// {{voice.userId}}, {{voice.joined}}, {{voice.left}}
});