Skip to content

Triggers

Triggers are rules that decide when an action should run.

A trigger watches for a specific event from a specific module group. When a matching event arrives, the trigger evaluates a condition — a small JavaScript expression. If it returns true, the linked action executes.

PropertyDescription
Module groupWhich module group to watch (e.g. twitch)
Event nameWhich event type to listen for (e.g. ChatMessage)
ProgramA JavaScript expression that returns true or false
ActionThe action to run if the condition passes
CooldownMinimum time between two executions (in milliseconds)
Cooldown modeHow the cooldown is applied (optional)
EnableWhether the trigger is active or not

The condition is a JavaScript expression with access to:

GlobalDescription
eventThe full event object (name, payload, emitter_group, etc.)
triggerThe trigger object itself
log(...)Log values for debugging (visible in process logs)
// Always trigger
true
// Only when the message starts with "!"
event.payload.message.startsWith("!")
// Only for a specific user
event.payload.user === "viewer42"
// Combine conditions
event.payload.message.startsWith("!hello") && event.payload.user !== "bot"

You can set a cooldown on a trigger to prevent it from firing too often. For example, a 5000ms cooldown means the trigger won’t fire again for 5 seconds after the last execution.

An action can have multiple triggers. Each trigger watches for a different event or has different conditions. This lets you reuse the same action for different scenarios.