BuildcordDocs

Token reference

Every token you can use in a text field, grouped by where it comes from.

Write a token in braces. See Values and tokens for how they work. A token that names nothing becomes empty.

Who and where

Available in every flow that someone set off. Schedules and webhooks get only {server.*} and {bot.*} when they act in a server.

TokenValue
{user.mention}Mentions whoever set the flow off
{user.name}Their display name
{user.id}Their Discord ID
{user.createdAt}When their account was made, in seconds since 1970
{user.voiceChannel}The voice channel they're in, if any
{member.accountAge}, {member.timeInServer}How old their account is, and how long they've been a member, in seconds
{member.roles}, {member.permissions}, {member.joinedAt}Their roles, permissions and join date, from a command, button or form
{server.name}, {server.id}The server
{server.memberCount}, {server.onlineCount}How many members it has, and how many are online
{server.owner}, {server.icon}Its owner's ID, and its icon's address
{server.boosts}, {server.boostTier}How many boosts it has, and its boost level
{channel.name}, {channel.id}, {channel.mention}The channel this happened in
{bot.id}, {bot.mention}The bot itself
{bot.latency}The bot's ping, in milliseconds
{bot.permissions}What the bot may do in the channel, from a command, button or form

{server.name} and the other server values are looked up when a flow uses them, and kept a few minutes.

Any time

TokenValue
{now}The time, in seconds. Write <t:{now}:R> to show it as a date.
{run.id}This run's ID

Commands

TokenValue
{option.name}The value of the option with that name
{target.id}The member a member option names, or else whoever ran it

Right-click commands

TokenValue
{target.id}, {target.mention}, {target.name}On a member: who it was opened on
{message.content}, {message.link}, {message.author}On a message: the message, and who wrote it

Schedules

TokenValue
{run.time}When this run started
{run.count}How many times this schedule has run, this one included

Buttons and menus

TokenValue
{component.data}What the button or menu was sent with, such as a row's number
{component.message}The ID of the message it's on
{component.choiceLabel}, {component.choice}From a menu: the choice made, and its ID

Webhooks

TokenValue
{webhook.body}What was sent, reached into with dots
{webhook.text}What was sent, exactly as it came
{webhook.query.name}A part of the address's query

Sub-flows

TokenValue
{input.name}In a sub-flow: what the flow that ran it gave it
{result.name}After Run another flow: what the sub-flow handed back

Produced by steps

These exist after the step that makes them.

TokenMade byValue
{sent.id}, {sent.channel}, {sent.link}Any step that sends a messageThe message, its channel and a link to it
{fetched.content}, {fetched.author.id} and moreRead a messageThe message read
{lookup.roles}, {lookup.joinedAt} and moreLook up a memberThe member looked up
{modal.label}Send a formThe answer to the input with that label
{http.status}, {http.body}Send an API requestThe status code and the response
{feed.item.title}, {feed.item.link} and moreCheck a feedThe newest item
{code.key} or {code.result}Run codeWhat the snippet returned
{row.id}, {row.column}, {rows.count}Find rows, For each row, Pick at randomA row's number and columns, and how many matched
{inserted.id}Add rowThe new row's number
{upserted.id}, {upserted.created}Add or change a rowThe row, and whether it was new
{updated.count}Change rowsHow many rows changed
{list.count}, {list.item}Change a listHow long the list is, and what was taken off
{loop.index}, {loop.item}Repeat, For each item, For each rowThe pass, starting at 1, and the item
{temp.name}Set a unique variable, Manipulate text, Work out an equation, Date and time, Read JSON, Count or total rows, Pick at randomA value that lasts for this run
{invite.url}, {invite.code}Create server inviteThe invite
{created.channel}, {created.channel.mention}Create a channel, Create a voice channelThe channel
{created.role}, {created.role.mention}Create a roleThe role
{thread.id}, {thread.mention}Create a thread, Create a forum postThe thread
{created.event}, {created.event.link}Schedule an eventThe event
{created.emoji}Add an emojiThe emoji
{purged.count}Purge messagesHow many were deleted
{bulk.count}Change a role for manyHow many members changed
{error.message}Any step that fails into its error way out, or a TryWhat went wrong

Documents

A token can hold a document, such as an API's answer or JSON read in: reach into it with dots ({http.body.user.name}), into a list by position from 0 ({http.body.items.0}), and ask a list's length with .length. A document written whole comes out as JSON.

Variables and secrets

TokenValue
{var.name}The variable with that name
{secret.NAME}A secret. Only Send an API request and a webhook address in Send as someone else fill it in.

Events

Event flows add their own tokens. See Events.

On this page