VirtualDeck desktop app
Alert variables reference
Placeholders are replaced at runtime from Twitch EventSub data, check-in records, or macro clip results.
Overlay and Raven TTS text share lib/alert-placeholders.js (replacePlaceholders, gift and channel-points builders).
Daily check-in chat uses separate templates; macros use applyMacroTemplateVars.
{username} works; {Username} or {USER} are left unchanged).
Alert overlay text vs. chat: Twitch alert overlay text uses single braces
{name}.
Macro step arguments use double braces {{name}} (different syntax).
Raven TTS: When Speak with Raven TTS is enabled on an alert, optional Raven TTS text is spoken after placeholders are resolved (same rules as overlay text). If TTS text is blank, the on-screen alert text is used.
Alert overlay text
Used in Tools → Alert Widget → Alert text, editor preview, and the OBS/browser overlay when an alert fires.
Implemented in replacePlaceholders() (lib/alert-placeholders.js).
| Placeholder | Becomes | Alert / event types | Example output | If empty |
|---|---|---|---|---|
{username} |
Twitch login (lowercase) | All alert types | coolviewer99 |
Unknown |
{user} |
Same value as {username} (alias) |
All alert types (overlay text and Raven TTS on alerts) | coolviewer99 |
Unknown |
{display_name} |
Display name from the event | All alert types | CoolViewer99 |
Unknown (falls back through user_name, then user) |
{displayName} |
Same intent as display name (camelCase alias) | All alert types | CoolViewer99 |
Unknown (falls back through display_name, user_name, user) |
{tier} |
Sub tier string from Twitch (e.g. 1000, 2000, 3000) |
Subscriber, resubscriber, gift sub, gift received | 1000 |
Empty string |
{months} |
Cumulative months subscribed | Subscriber, resubscriber | 12 |
Empty string |
{message} |
Resub message (message.text when Twitch sends an object), cheer text, or redemption user input (user_input) |
Resubscriber, bits, channel point redemption | Love this stream! |
Empty string |
{viewers} |
Raid viewer count | Raid | 250 |
Empty string |
{bits} |
Bits cheered (also reads bits_used, bits_amount, amount on the event) |
Bits / cheer | 500 |
Empty string |
{reward} |
Channel points reward title | Channel point redemption (matched alert), daily check-in | Hydrate |
Empty string |
{recipient} |
Gift recipient display/login, or the community for mass gifts |
Gift sub (channel.subscription.gift, gifted channel.subscribe) |
LuckyViewer or the community |
Empty string |
{count} |
Number of subs gifted (total on mass gift events; 1 on single gifted subs) |
Gift sub events (same as {recipient}) |
10 |
Empty string |
{moderator} |
Moderator login who issued the ban | Ban | modname |
Empty string |
{reason} |
Ban reason from Twitch | Ban | Spam |
Empty string |
{total_checkins} |
All-time check-in count for that viewer | Daily check-in | 42 |
0 |
{streak} |
Consecutive-day streak (only when streaks are enabled in check-in settings) | Daily check-in | 7 |
0 |
Event cheat sheet
Which placeholders are populated for each alert type when Twitch fires the event (plus all types: {user}, {username}, {display_name}, {displayName}).
| Alert type | Twitch source | Notable placeholders |
|---|---|---|
| Follower | channel.follow, poll.follow |
— |
| Subscriber / resub | channel.subscribe, channel.subscription.message |
{tier}, {months}, {message} |
| Gift sub | channel.subscription.gift, gifted channel.subscribe |
{tier}, {recipient}, {count} (gifter → {username}) |
| Gift received | Gifted channel.subscribe (broadcaster mapping) |
{tier}, often {recipient} / {count} when gift fields apply |
| Raid | channel.raid |
{viewers} |
| Bits | channel.cheer |
{bits}, {message} (optional bits threshold) |
| Ban | channel.ban |
{moderator}, {reason} |
| Channel point redemption | channel.channel_points_custom_reward_redemption.add |
{reward}, {message}, {username}, {display_name} |
| Daily check-in | Configured check-in reward (not channel-points alerts) | {total_checkins}, {streak}, {reward} |
| First-chat walk-on | First chat from selected followers | — |
Channel point redemption alerts
Create a Channel Point Redemption alert and pick the reward from the list (saved as reward ID when available). On live redeems, only alerts whose reward matches fire: exact reward ID when configured, otherwise normalized title match. Daily check-in uses its own alert type and is handled before generic channel-points matching.
Gift placeholders
On channel.subscription.gift, {count} is the event total.
If total > 1, {recipient} is the literal phrase the community; for a single gift it is the recipient’s display name or login.
On a gifted channel.subscribe, {username} / {display_name} refer to the gifter when Twitch provides gifter fields, and {recipient} is the person who received the sub.
Raven TTS (per alert)
In the Alert Widget, enable Speak with Raven TTS and optionally set Raven TTS text.
At trigger time, resolveAlertSpeakText() picks TTS text (or falls back to alert overlay text), runs replacePlaceholders(), then sends the result to Raven.
Requires Raven AI configured (ElevenLabs key, voice, and AI features enabled). Placeholder support is the same as on-screen alert text, including {user} as an alias of {username}.
Speak (TTS) macro step and deck buttons
The macro tool speak_tts and deck button type Speak (TTS) use resolveSpeakTtsText() in lib/raven-speak-tts.js, which calls the same replacePlaceholders() as alert overlay text.
When the step runs without event-specific data, {user}, {username}, and related fields use your connected Twitch login; {socials} comes from Preferences → Socials.
When a macro runs after Twitch events (or with injected user data), the same placeholders as alert overlay text apply for that context.
Macro-only double-brace vars such as {{clipUrl}} are expanded on the step arguments first, then single-brace alert placeholders run on the spoken line.
Requires a Pro AI license and Raven AI running; see in-app macro docs for optional skip behavior.
Daily check-in chat messages
Configured under the daily check-in section of the Alert Widget (Chat response and Already checked in today).
These are sent to Twitch chat when Send response to chat is enabled. They use their own replace logic (not replacePlaceholders).
| Placeholder | Chat response | Already checked message | If empty |
|---|---|---|---|
{username} |
Yes | Yes | Empty string (no Unknown fallback) |
{display_name} |
Yes | Yes | Falls back to username |
{total_checkins} |
Yes | No — not substituted | 0 in chat response only |
{streak} |
Yes | No — not substituted | 0 in chat response only |
{displayName}, {tier}, {reward}, and other alert overlay placeholders are not processed in these chat templates.
Macro step variables
Used in macro step argument JSON (for example Discord clip posts after twitch_create_clip).
Syntax: {{variableName}} — double braces, ASCII word characters only ([A-Za-z0-9_]).
| Placeholder | Becomes | When available | If empty |
|---|---|---|---|
{{clipUrl}} |
Public Twitch clip URL | After a successful twitch_create_clip step in the same macro run |
Left as literal {{clipUrl}} |
{{clipId}} |
Twitch clip ID | Same as {{clipUrl}} |
Left as literal {{clipId}} |
Single-brace alert placeholders ({clipUrl}) are not expanded in macros.
Unknown {{keys}} stay unchanged in the step arguments.
Not supported as placeholders
{user}in daily check-in chat templates — use{username}there (chat uses separate replace logic, notreplacePlaceholders).{amount}— not a separate token; bit amounts use{bits}.- Single-brace clip URLs in macros — use
{{clipUrl}}/{{clipId}}in macro step arguments only.
App source: jontslater/virtualdeck.
Last verified against main at commit 8f4ac04.