Variables and data

{variables} inject live values into step fields while a flow runs. The data store keeps values across runs and restarts. The secrets vault holds credentials outside the flow entirely.

Built-in variables

Filled from the event context on every run.

VariableResolves toTypical use
{user}Mention of the member who triggered the flow (<@id>).messages, embeds
{userId}Their raw user ID - use in target-ID fields.memberInfo target, data keys
{username}Their username.messages, embeds
{server}Guild name (falls back to "this server" in DMs).messages
{memberCount}Current server member count.welcome messages
{channel}Mention of the channel the trigger fired in.messages
{latency} / {ping}The bot's websocket ping in milliseconds.ping commands
{content}The raw message text on message-based triggers.keyword flows, logs
{oldContent}The previous text on message-edit triggers.edit logging
{messageId}ID of the message the trigger fired on.editMessage, deleteMessage
{voiceChannel}The voice channel name on voice triggers.voice alerts
{emoji}The emoji name on reaction triggers.reaction flows

Input variables

What the user provided. Typed options are the recommended primitive on slash commands.

VariableResolves toExample
{args}The full free-text input: everything after a prefix command, or the args box on slash commands that use it.say {args}
{arg:0}, {arg:1}, ...One word each from the input. Mentions resolve to raw IDs.ban {arg:0} for {args}
{option:name}A slash option's display value: mention for user/role/channel, URL for attachment, raw value for string/number/boolean.warned {option:user}
{optionId:name}A slash option's raw ID - what target-ID fields want.kick {optionId:user}
{selected}Picked values on button/select-menu triggers (comma-separated).you picked {selected}

Runtime variables

Set by steps during the run, or resolved from the vault.

VariableResolves toProduced by
{var:key}A value stored during this run by Set Variable, an interactive step, or a data read.setVariable, askQuestion, dataGet
{var:key.field.sub}Dot-path into a JSON variable saved by httpRequest, info, or datastore steps.{var:res.player.name}
{var:error} / {var:lastError}The last step error message - pair with error output wires.error alerts to staff
{secret:NAME}A value from the bot's Secrets vault - see the warning below.apiRequest auth header

The persistent data store

Values written by the Data: steps live in a per-bot database and survive restarts - this is where points, AFK states, counters, and configuration live. Every key belongs to a scope:

ScopeWhat it meansUse for
userOne value per member per server: points, balances, warn counts, AFK text.economies, scoreboards
guildOne value shared per server: counting number, starboard threshold, config.counting, settings
botOne value across every server the bot is in: global stats, feature flags.total runs, kill switch

User-scoped keys are keyed by the member who ran the flow - or the target member when the step has a target field. The same key holds different values per member at the same time, which is what makes points work as a leaderboard: everyone increments their own row, and Data: leaderboard ranks them.

Data store steps

The Logic & Variables group contains the full store API.

StepWhat it does
Data: getReads a key into a variable. Returns your fallback text when the key was never set.
Data: setWrites a key, overwriting any previous value.
Data: incrementAdds to a numeric key and stores the new total in a variable - negative amounts subtract. The standard points primitive.
Data: deleteRemoves one key for one member (or a specific target member).
Data: clear allWipes a key for every member at once - comma-separated keys or * for the whole scope. Saves the deleted count. Premium.
Data: listReads up to 50 keys matching a prefix into a variable or posts them.
Data: leaderboardRanks the top N members for a key as a mention list - drives scoreboard commands. Premium.

Secrets and connections

Two vaults keep credentials out of flow JSON:

  • Secrets (the bot's Secrets tab): named key-value pairs, AES-encrypted at rest, max 25 per bot. Referenced by name as {secret:NAME}. Values are write-only - the API never returns them.
  • Connections (the Connections tab): full provider configs - game server RCON, AI provider keys, Twitch client credentials. Nodes reference a connection by ID; the executor decrypts it server-side at runtime. A flow can never reach another bot's connections.

Warning: {secret:NAME} resolves in any step field - it is replaced with the real value wherever it appears. Never put it in a message or embed field that posts publicly; reserve it for credential fields (API auth headers, connection-style configs). A missing name resolves to an empty string, not an error.

Where variables work

Nearly every text field accepts variables: message and embed bodies, titles, footers, image URLs, variable names and values, data keys, channel/role/user-ID fields, API URLs, AI prompts, and conditions. They are per-run - two people running the same command each see their own values. A variable that was never set resolves to an empty string, so test with {var:key} fallbacks (Data: get's fallback field, or an If Variable isEmpty check) for values that may not exist yet.

Related: node reference for every step that produces variables, and trigger reference for the per-event variables.