Skip to content

Events

An event is the when of a trigger: a chat command, a redemption, a raid, a key you press. This page lists every event CroStream can react to, grouped by the integration it comes from, as the Event list in the trigger editor shows them. For each one you get its options (the settings under Event in the trigger editor) and the variables it hands to the macro.

The trigger editor shows the same list

Pick an event and the Variables from this event panel on the right lists what it provides. In the macro editor, Available variables under each step lists them too, so you rarely need to look anything up.

Variables every run has

Besides the event's own variables, every macro run gets these:

Variable Meaning
{rule} The name of the trigger that started the run (the macro's name when you press Run).
{user_role} The role of whoever caused the run: everyone, subscriber, vip, moderator or broadcaster. everyone when nobody did (a timer, the stream going live).
{detail} A short description of what fired the trigger, such as the chat message or the combination pressed. Not every event sets it.

Variables an event doesn't set are left as you wrote them, so {bits} in a follow macro stays {bits}. See Variables for the details.

At a glance

Integration Events
Twitch Chat command, Channel point redemption, Follow, Subscription, Gifted subs, Cheer or power-up, Raid, Stream online/offline, Title or category change, Ad break, Hype train, Poll ended, Prediction ended, Built-in channel point reward
Steam A Steam game starts, A Steam game stops, A screenshot is taken
Hotkeys Hotkey
Queues Queue release
Tools On a timer
Webhooks A webhook is received
Viewers First-time chatter, Returning chatter

Twitch

These need you to be logged in to Twitch. An event whose Twitch permission is missing is marked Unavailable in the list until you log in again.

Chat command

Fires when a chat message starts with the command.

Only the first word of a message counts, and capital letters don't matter: !Clip now fires !clip. Aliases work the same way (for example !c). Messages CroStream sends itself never fire a command.

Option Type Details
Command required Text For example !clip. Matched case-insensitively against the first word.
Aliases List Separate entries with commas.
Variable Meaning
{user} Display name of the chatter.
{user_login} Login name of the chatter.
{user_id} Twitch user ID of the chatter.
{args} Text after the command.
{arg1} 1st word after the command.
{arg2} 2nd word after the command.
{arg3} 3rd word after the command.
{arg4} 4th word after the command.
{arg5} 5th word after the command.
{arg6} 6th word after the command.
{arg7} 7th word after the command.
{arg8} 8th word after the command.
{arg9} 9th word after the command.

Channel point redemption

Fires when a viewer redeems a channel point reward.

For a reward that waits in Twitch's request queue, CroStream completes or refunds the redemption once every macro it started has finished. See Refunds.

Option Type Details
Reward Pick Pick a reward, or Any reward for every redemption. Picked from your channel point rewards (or Any reward).
Text contains Text Only fire when the viewer's text contains this (case-insensitively), for rewards that ask for text.
Variable Meaning
{user} Display name of the redeemer.
{user_login} Login name of the redeemer.
{user_id} Twitch user ID of the redeemer.
{input} Text the viewer entered, if the reward asks for it.
{reward} Title of the reward.
{reward_id} ID of the reward.
{cost} Channel points the reward cost.

Follow

Fires when someone follows the channel.

No options: every such event fires the trigger.

Variable Meaning
{user} Display name of the follower.
{user_login} Login name of the follower.
{user_id} Twitch user ID of the follower.

Subscription

Fires for new subs and for resubs shared in chat. Gifted subs fire for each recipient only when included; use the Gifted subs event to react once per gift.

Option Type Details
Tier Choice Default any Prime subs only match "prime" or "any". One of any, 1, 2, 3, prime.
Minimum months Number Cumulative months, for example 12 for an anniversary.
Gifted subs Choice Default exclude Whether subs received as a gift fire this trigger. One of exclude, include, only.
Variable Meaning
{user} Display name of the subscriber.
{user_login} Login name of the subscriber.
{user_id} Twitch user ID of the subscriber.
{tier} 1, 2 or 3. A Prime sub is 1.
{months} Cumulative months subscribed.
{streak} Consecutive months, if the viewer shared it.
{message} The resub message, if any.
{gifter} Who gifted the sub, for gifted subs.

Gifted subs

Fires once per gift, however many subs it holds. Use count ranges (1–4, 5+) so one gift fires one trigger.

Recipients of a gift fire Subscription too, but only if that trigger's Gifted subs option includes them.

Option Type Details
Tier Choice Default any One of any, 1, 2, 3.
Minimum subs Number
Maximum subs Number 0 means no maximum.
Variable Meaning
{user} Display name of the gifter ("Anonymous" for anonymous gifts).
{user_login} Login name of the gifter ("Anonymous" for anonymous gifts).
{user_id} Twitch user ID of the gifter ("Anonymous" for anonymous gifts).
{count} Subs in this gift.
{tier} 1, 2 or 3.
{total} The gifter's lifetime gifts in the channel, when Twitch shares it.

Cheer or power-up

Fires when a viewer spends bits on a cheer or a power-up.

Option Type Details
Kind Choice Default any power_up includes custom power-ups. One of any, cheer, power_up.
Minimum bits Number
Maximum bits Number 0 means no maximum.
Variable Meaning
{user} Display name of the viewer.
{user_login} Login name of the viewer.
{user_id} Twitch user ID of the viewer.
{bits} Bits spent.
{kind} cheer, power_up or custom_power_up.
{message} The cheer message, if any.
{power_up} The power-up's type or custom title.

Raid

Fires when another channel raids yours. Use viewer ranges (1–49, 50+) so one raid fires one trigger.

Option Type Details
Minimum viewers Number
Maximum viewers Number 0 means no maximum.
Variable Meaning
{user} Display name of the raiding broadcaster.
{user_login} Login name of the raiding broadcaster.
{user_id} Twitch user ID of the raiding broadcaster.
{viewers} Viewers brought by the raid.

Stream online/offline

Fires when the stream goes online or offline.

Option Type Details
When required Choice Default online One of online, offline.
Variable Meaning
{stream_type} live, playlist, watch_party, premiere or rerun (when going online).

Title or category change

Fires when the stream title, category or language changes.

No options: every such event fires the trigger.

Variable Meaning
{title} The stream title.
{category} The category (game) name.
{language} The broadcast language.

Ad break

Fires when an ad break starts, scheduled or manual.

No options: every such event fires the trigger.

Variable Meaning
{duration} Length of the break in seconds.
{automatic} true for a scheduled break, false for one started by hand.

Hype train

Fires as a hype train starts, levels up, progresses or ends. progress includes level-ups.

Option Type Details
When required Choice Default begin One of begin, level_up, progress, end.
Variable Meaning
{level} The train's level.
{total} Points contributed so far.
{goal} Points needed for the next level.
{progress} Points toward the next level.
{train_type} regular, golden_kappa or treasure.

Poll ended

Fires when a poll completes or is ended early.

No options: every such event fires the trigger.

Variable Meaning
{title} The poll question.
{winner} The winning choice; ties are joined with " / ".
{votes} Votes for the winning choice.
{status} completed, or terminated when ended early.

Prediction ended

Fires when a prediction is resolved or canceled.

Option Type Details
Outcome Choice Default any One of any, resolved, canceled.
Variable Meaning
{title} The prediction.
{winner} The winning outcome; empty when canceled.
{status} resolved or canceled.

Built-in channel point reward

Fires when a viewer redeems one of Twitch's built-in rewards, such as a highlighted message or an emote unlock.

Option Type Details
Reward Choice Default any One of any, send_highlighted_message, single_message_bypass_sub_mode, random_sub_emote_unlock, chosen_sub_emote_unlock, chosen_modified_sub_emote_unlock.
Variable Meaning
{user} Display name of the viewer.
{user_login} Login name of the viewer.
{user_id} Twitch user ID of the viewer.
{reward} The reward type, such as send_highlighted_message.
{cost} Channel points spent.
{message} The viewer's message, for message rewards.
{emote} The unlocked emote, for emote rewards.

Steam

These need the Steam integration connected (Steam running on this computer).

A Steam game starts

Fires when you start playing a game on Steam, for example to set your Twitch category.

Option Type Details
Game Pick Leave empty for any game. Picked from your Steam games.
Variable Meaning
{game} The game's name.
{appid} The game's Steam app ID.
{playtime_hours} Your total hours in the game, with one decimal.

A Steam game stops

Fires when you stop playing a game on Steam.

Option Type Details
Game Pick Leave empty for any game. Picked from your Steam games.
Variable Meaning
{game} The game's name.
{appid} The game's Steam app ID.
{playtime_hours} Your total hours in the game, with one decimal.
{session_minutes} How long you played this time, in minutes.

A screenshot is taken

Fires when you take a screenshot with Steam's screenshot key (F12 by default) in a game.

Option Type Details
Game Pick Leave empty for any game. Picked from your Steam games.
Variable Meaning
{game} The game's name.
{appid} The game's Steam app ID.
{screenshot_path} The screenshot file on this computer.

Hotkeys

Built in. See Hotkeys for how to set one up.

Hotkey

Fires when you press a key combination anywhere on this computer, even while a game has focus.

Differences between Windows, macOS and Linux
System Support Notes
Windows Works
macOS Works Needs the Accessibility permission: System Settings → Privacy & Security → Accessibility. No Insert, F21–F24 or media Stop key.
Linux Limited X11 sessions only (or XWayland); not available on pure Wayland.
Option Type Details
Keys required Keys Click the box and press the combination, e.g. Ctrl+Shift+F9. F13–F24 and media keys work on their own.
Variable Meaning
{keys} The combination pressed.

Queues

Built in. See Queues.

Queue release

Fires each time a queue lets an item out, with the values the item stored when it was added.

Option Type Details
Queue required Pick Which queue. Create queues on the Queues page. Picked from your queues.
Variable Meaning
each stored field One variable per field of the chosen queue, named after the field, such as {who} or {sound}.
{user} Who added the item, empty when no one did. A queue field with the same name as one of these variables is hidden by it.
{user_login} The login name of who added the item.
{user_id} The ID of who added the item.
{queue} The name of the queue.
{queue_remaining} How many items are still waiting after this one.
{queue_item_id} The item's ID.
{queued_at} The time of day the item was added, like 14:05:09.
{waited} How long the item waited, like 45s, 1m 20s or 2h 3m.
{waited_seconds} How long the item waited, in whole seconds.

Tools

Built in.

On a timer

Fires every few minutes, for timed messages and watch-time rewards. The first fire comes one interval after the app starts or the trigger is saved.

Option Type Details
Every required Duration Default 10m From 1m to 24h, for example 10m or 1h30m.
Only while live On/off Default On Skip the timer while the stream is offline.
Only if at least this many chat messages since the last time Number Default 0 0 to 1000. Keeps timed messages from piling up in a quiet chat. 0 turns it off.
Variable Meaning
{count} How many times this timer has fired since it started.
{every} The interval, for example 10m.

Webhooks

Built in. See Webhooks.

A webhook is received

Fires when another app calls one of your incoming webhooks and the call is accepted: the right address, an allowed method, and a valid token or signature. Calls that are refused fire nothing.

No viewer causes this event, so the trigger's Minimum role always passes and {user} isn't set. A trigger's Cooldown works, and is a good way to ignore a sender that calls too often.

Option Type Details
Webhook required Pick Which incoming webhook. Create them on the Webhooks page. Picked from your incoming webhooks.
Variable Meaning
{body} The request body as text, at most 64 KiB.
{content_type} The request's Content-Type header.
{method} The HTTP method, such as POST.
{hook} The webhook's name.
{remote} The IP address the request came from.
{query.<name>} A query string parameter, such as {query.scene} for ?scene=intro. The token parameter is left out. At most 64, each up to 4 KiB.
{header.<name>} A request header, with its name in lowercase, such as {header.user-agent}. Authorization, Proxy-Authorization, Cookie and the signature header are left out. At most 64, each up to 4 KiB.
each mapped variable One variable for each row of the webhook's Variables panel, set from a JSON or form body, or its If missing value.
{detail} A summary such as Ko-fi received (748 bytes).

Test on the trigger uses the webhook's saved sample body, mapped by its rules, with {method} POST, {remote} 127.0.0.1 and an empty {content_type}.

Viewers

These need the viewer database, which is on unless you turned it off on the Viewers page.

First-time chatter

Fires when someone writes their first chat message ever, so you can welcome them.

No options: every such event fires the trigger.

Variable Meaning
{user} Display name of the chatter.
{user_login} Login name of the chatter.
{user_id} Twitch user ID of the chatter.
{message} The chat message.
{streams} Streams they were in before this one.
{days_away} Days since they were last seen.
{watch_time} Time they had watched before, such as 12h 5m.
{points} Their points.
{messages} Chat messages they had written before.

Returning chatter

Fires on a viewer's first message of a stream when they had chatted before, so you can welcome them back.

Option Type Details
Away for at least (days) Number Default 0 0 welcomes everyone back; 30 only those who were gone a month or more. Up to 365.
Variable Meaning
{user} Display name of the chatter.
{user_login} Login name of the chatter.
{user_id} Twitch user ID of the chatter.
{message} The chat message.
{streams} Streams they were in before this one.
{days_away} Days since they were last seen.
{watch_time} Time they had watched before, such as 12h 5m.
{points} Their points.
{messages} Chat messages they had written before.