K
Docs
API Reference

💫 Sparks Reference

Spark paths match the Canvas autocomplete — context from triggers and spells, flow sparks from upstream pieces, library values from Booster Packs.

📐Under the hood — Usage
TypeScript
// Use {{path}} in any string config field on a Piece node.
// Example: "Hello {{input.user.name}}, you have {{score}} points!"
//
// Spell context: input.user.id, input.user.name, input.guild.id, input.options.*
// Event context: varies by trigger — see each event reference page
// Flow sparks: named by upstream pieces ({{result}}, {{score}}, {{item}})
💡Good to know

Wrap paths in {{double curly braces}}. Missing paths resolve to an empty string at runtime.

🪄Context sparks (Spells)

Available in every spell flow from the first node.

PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{input.user.id}}stringWho ran the command — Discord ID
{{input.user.name}}stringWho ran the command — username
{{input.user.displayName}}stringWho ran the command — their display name
{{input.channel.id}}stringThe channel this command was used in
{{input.channel.name}}stringThe channel's name
{{input.user.avatar}}imageWho ran the command — avatar image (animated ones stay animated)

⏱️Context sparks (Timers)

PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{timestamp}}stringCurrent time in ISO format
{{date}}stringToday's date

⚡Context sparks (Triggers)

Paths differ by event type — open a trigger reference for the full list.

🟢 Bot is ready →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
👋 Member joins →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{member.id}}stringThe new member's Discord ID
{{member.username}}stringTheir Discord username
{{member.displayName}}stringTheir nickname in this server, or username if none
{{member.name}}stringTheir username (alias for member.username)
{{member.joinedAt}}stringWhen they joined (ISO timestamp)
{{member.avatar}}imageTheir avatar — server avatar if they set one
👋 Member leaves →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{member.id}}stringThe member who left — their Discord ID
{{member.username}}stringTheir username
{{member.displayName}}stringTheir display name (may be unavailable if uncached)
{{member.name}}stringTheir username (alias for member.username)
{{member.avatar}}imageTheir avatar — server avatar if they set one
🔨 Member banned →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{ban.user.id}}stringDiscord ID of the banned user
{{ban.user.username}}stringUsername of the banned user
{{ban.reason}}stringReason provided for the ban (may be empty)
🔓 Member unbanned →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{ban.user.id}}stringDiscord ID of the unbanned user
{{ban.user.username}}stringUsername of the unbanned user
💬 Message sent →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{message.id}}stringThe message's unique ID
{{message.content}}stringThe full text of the message
{{message.channelId}}stringID of the channel the message was sent in
{{message.author.id}}stringDiscord ID of who sent the message
{{message.author.username}}stringSender's Discord username
{{message.author.displayName}}stringSender's display name (or username if they have none)
{{message.author.name}}stringSender's username (alias for message.author.username)
{{channel.id}}stringID of the channel (same as message.channelId)
{{channel.name}}stringName of the channel
{{message.image}}imageFirst image on the message — attachment, embed image or sticker
{{message.images}}arrayEvery image on the message, as a list
{{message.imageCount}}numberHow many images the message carries
{{message.attachments}}arrayEvery file attached to the message (images or not)
{{message.author.avatar}}imageAvatar of whoever sent the message
{{message.url}}stringLink that jumps straight to the message
{{message.replyTo}}stringID of the message this one replies to (empty if it isn't a reply)
🗑️ Message deleted →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{message.id}}stringThe deleted message's ID
{{message.content}}stringThe deleted message's text (empty if message was not cached)
{{message.channelId}}stringID of the channel the message was in
{{message.author.id}}stringWho sent the message (may be empty for uncached messages)
{{message.author.name}}stringSender's username (may be empty for uncached messages)
{{channel.id}}stringID of the channel (same as message.channelId)
✏️ Message edited →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{oldMessage.content}}stringThe message before the edit (empty if uncached)
{{newMessage.content}}stringThe message after the edit
{{message.id}}stringThe message's unique ID
{{message.author.id}}stringDiscord ID of who sent the message
{{message.author.name}}stringAuthor's username
{{message.channelId}}stringID of the channel
{{channel.id}}stringID of the channel (same as message.channelId)
{{channel.name}}stringName of the channel
{{message.image}}imageFirst image on the edited message — attachment, embed image or sticker
{{message.images}}arrayEvery image on the edited message, as a list
{{message.imageCount}}numberHow many images the edited message carries
{{message.attachments}}arrayEvery file attached to the edited message (images or not)
{{message.author.avatar}}imageAvatar of whoever sent the edited message
{{message.url}}stringLink that jumps straight to the edited message
😀 Reaction added →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{reaction.emoji}}stringThe emoji that was reacted with
{{reaction.userId}}stringDiscord ID of who reacted
{{reaction.messageId}}stringID of the message that was reacted to
{{reaction.channelId}}stringID of the channel where the reaction happened
😶 Reaction removed →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{reaction.emoji}}stringThe emoji that was removed
{{reaction.userId}}stringDiscord ID of who removed the reaction
{{reaction.messageId}}stringID of the message
{{reaction.channelId}}stringID of the channel
🎙️ Voice state changes →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{voice.userId}}stringDiscord ID of the user who changed voice state
{{voice.channelId}}stringVoice channel ID (empty string if they left)
{{voice.joined}}booleanTrue when the user joined a voice channel
{{voice.left}}booleanTrue when the user left a voice channel
⚡ Interaction received →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{interaction.user.id}}stringDiscord ID of who triggered the interaction
{{interaction.user.username}}stringUsername of the person who triggered the interaction
{{interaction.channelId}}stringID of the channel the interaction came from
{{interaction.type}}stringInteraction type (Button, SelectMenu, ModalSubmit, etc.) — slash commands go to Spells
🔘 Button pressed →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{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
🔽 Dropdown chosen →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{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
🪟 Form submitted →
PathTypeDescription
{{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
{{input.guild.icon}}imageYour server's icon image (empty if it has none)
{{form.customId}}stringCustom id of the form that was submitted
{{form.args}}stringAnything after the colon in the form's custom id
{{component.user.id}}stringDiscord ID of whoever submitted the form
{{component.user.username}}stringUsername of whoever submitted the form
{{component.channelId}}stringChannel the form was opened from

📥Option spark shapes (by Discord type)

Discord typetype intSub-paths
STRING3—
INTEGER4—
BOOLEAN5—
NUMBER10—
USER6.id .username .displayName
CHANNEL7.id .name
ROLE8.id .name

📝Flow sparks (from Pieces)

Downstream pieces expose sparks by the name you configure (as / name fields).

PathTypeDescription
{{<name>}}variesNamed spark you set — use {{score}}, not vars.score
{{<as>}}arrayAll matching rows — e.g. {{result}}
{{<as>.length}}numberNumber of rows returned
{{<as>.0.<column>}}variesFirst row column — e.g. {{result.0.coins}}
{{<as>}}variesCurrent loop item — name from “Call each item” field
{{<as>}}string | numberResult spark named in the piece config

See each Piece reference for the exact sparks it adds.

🎴Library sparks (Packs)

PathTypeDescription
{{lib.filter.profanity}}arrayArray of common profanity and strong language
{{lib.filter.slurs}}arrayArray of racial, ethnic, and identity-based slurs
{{lib.filter.spam_phrases}}arrayArray of common spam and scam phrases
{{lib.filter.discord_invite}}string (regex)Regex — detects Discord invite links (discord.gg/...)
{{lib.filter.external_links}}string (regex)Regex — detects any http or https URL
{{lib.filter.excessive_caps}}string (regex)Regex — detects 4+ consecutive uppercase characters (SHOUTING)
{{lib.validate.email}}string (regex)Regex — validates email address format (user@domain.tld)
{{lib.validate.url}}string (regex)Regex — validates http/https URLs
{{lib.validate.phone}}string (regex)Regex — validates international phone numbers (E.164 style, optional +)
{{lib.validate.discord_id}}string (regex)Regex — validates Discord snowflake IDs (17–20 digit numbers)
{{lib.validate.discord_invite}}string (regex)Regex — validates a Discord invite link or code
{{lib.validate.hex_color}}string (regex)Regex — validates hex color codes (#RGB or #RRGGBB)
{{lib.validate.ip_address}}string (regex)Regex — validates IPv4 addresses (0.0.0.0 – 255.255.255.255)
{{lib.validate.number_only}}string (regex)Regex — validates that a string contains only digits (0–9)
{{lib.fun.eight_ball}}arrayThe 20 classic Magic 8-Ball answers
{{lib.fun.jokes}}array30 clean one-liners and dad jokes
{{lib.fun.compliments}}array25 wholesome compliments
{{lib.fun.roasts}}array20 gentle, friendly roasts
{{lib.fun.would_you_rather}}array25 "Would you rather…" questions
{{lib.fun.truths}}array20 truth questions for truth or dare
{{lib.fun.dares}}array20 dares you can actually do in Discord
{{lib.fun.fortunes}}array20 fortune-cookie fortunes
{{lib.fun.icebreakers}}array25 conversation starters — great for a question of the day
Packs docs →