Cheatsheet
The fastest path to common patterns. Each snippet is the actual template string - paste it into a chatbot command's response, an overlay label's value, or an alert's TTS message.
Display data in chat
Show donation total
Tips received: {{total_donation_amount_currency_symbol}}{{total_donation_amount}}
Show session sub count
{{session_subscriber_count}} subs this session - let's go!
Show top tipper this session
Session top tipper: {{session_top_tipper}} with {{session_top_tipper_amount}}
Show the streamer's current game / title
Playing {{game}} - {{title}}
Show a recent-events feed
Recent tips: {{recent_tips}}
Recent followers: {{recent_followers}}
Use chat input
Echo back the rest of the command
{{message}}
Get the first / second argument
{{arg=1}} challenges {{arg=2}} to a duel!
Fall back when an argument is missing
Hugs to {{coalesce={{arg=1}},a friendly viewer}}
Random + math
Random integer in a range
You rolled a {{random=1-100}}
Random pick from a fixed list
Your class is {{random_inputs=Wizard,Goblin,Tank,NPC,Speedrunner}}
Math expression with variables
That's {{math={{count=deaths}}*2}} deaths-equivalent
Mod actions in a command
Time a user out from a chatbot response
{{nuke_username={{arg=1}},600}}
Self-timeout (vanish)
{{vanish}}
Change the stream title
{{settitle={{message}}}}Title updated to {{message}}
Counters
Increment a counter
That's death #{{counter=deaths,+1}}. Pain.
Read a counter without incrementing
Sub goal: {{subgoal}} / 100
Reset a counter
{{counter=deaths,=0}}Deaths reset.
Loyalty
Show the caller's loyalty rank
{{username}}'s rank: {{user_rank}}
Top 5 loyalty holders
Top 5: {{loyalty_top=5}}
Give a viewer points
{{add_points={{arg=1}},{{arg=2}}}}Added {{arg=2}} points to {{arg=1}}
External data
Hit a custom API
{{read_url=https://twitch.center/customapi/quote?token=abc123&no_id=1}}
Pull a specific JSON field
Today's joke: {{read_url=https://x.com/api,setup}} - {{read_url=https://x.com/api,punchline}}
Weather
{{weather=Seattle}}
AI prompt
{{ai_prompt=Roast {{message}} in 20 words or less, twitch-safe}}
Build a goal that auto-updates
Add a Goal layer to your overlay and set:
value:{{total_donation_amount}}(current progress)valueGoal:{{tip_goal}}(the target)
The valueGoal template resolves on every render, so the bar updates whenever the goal variable is rewritten.
The same pattern works for:
{{follower_goal}},{{subscriber_goal}},{{cheer_goal}},{{superchat_goal}}{{merch_goal_orders}},{{merch_goal_items}},{{merch_goal_total}}
Fire an overlay HFX from a chat command
The chatbot command's HFX action picker writes the HFX content. Lumia routes the dispatch through OverlayManager.send(HFX, …) - no template syntax needed. If you want to programmatically pause SFX globally without ripping the HFX out of every command:
{{set_sfx_muted=true}}
That suppresses TTS, HFX audio, and AudioManager.play calls until you flip it back.
Send a chat message from a custom action
The chatbot has an inbuilt chatbot message field. For more dynamic flows (e.g. inside Custom JS), use the IPC:
await ipcRenderer.invoke("chatbot:send", { site: "twitch", message: "Hello from custom JS" });
Wire a chat command to an overlay layer (no chatbot command needed)
The Emote Alert and Hype Train layers both support a chatTrigger config:
{
"chatTrigger": {
"enabled": true,
"command": "!kappagen",
"allowedRoles": ["anyone"],
"cooldownSeconds": 10
}
}
See Chat triggers for the pattern and how to build it into your own layers.
Ask an AI assistant instead
With the MCP server connected, these are prompts rather than snippets:
| Say this | It calls |
|---|---|
| "What commands and scenes do I have?" | get_settings |
| "Set my lights to a warm sunset." | set_color |
| "Test my follower alert." | trigger_alert |
| "Set my death counter to 5." | set_variable |
| "Make a !socials command linking my Twitter and TikTok." | manage_chatbot_command |
| "Watch for the next follower and thank them by name." | wait_for_event + send_chat_message |
See the tool reference for all 43 tools.
I'm new - where do I go next?
- Want the full variable reference? → Platform Variables
- Building a custom overlay? → Custom Overlays
- Writing custom JavaScript? → Custom JavaScript
- Want an AI assistant to run it? → MCP Server