Guide

Triggers

Overview of trigger configuration in Streamer.bot

Introduction

The release of Streamer.bot 0.2.0 included a large overhaul to the events system, with the introduction of Triggers.

You now have more control over events and their execution through Trigger configuration options, and events can now trigger more than one action.

Triggers also introduced the ability to easily test your actions!

Configuration

To activate the triggers pane, you must first select an action by clicking on it in the main actions pane.

Right-Click anywhere in the triggers pane (or click the + icon in the top right) to browse triggers and add them to your selected action.

Explore all available triggers and their configuration options in the Triggers API References

Types

You will notice several core types of configuration options when setting up your triggers, outlined below:

Basic

These triggers require no additional configuration.

For example, the Streamer.bot Started Trigger always executes on initial startup of Streamer.bot with no additional configuration needed.

Toggle

Checkbox configuration can be used to filter incoming triggers based on multiple event types, which can be toggled on or off.

Checkbox Trigger Configuration

For example, the Twitch Subscription Trigger allows you to toggle incoming trigger events for each subscription tier.

Select

Dropdown configuration can be used to filter incoming triggers based on preexisting values.

Dropdown Trigger Configuration

For example, the Command Cooldown Trigger allows you to filter incoming trigger events for specific commands.

These triggers also include the option Any, which allows events to trigger on any of the included options.

Range

Range configuration is used for filtering incoming numeric triggers based on minimum and maximum values.

Range Trigger Configuration

For example, the Twitch Cheer Trigger allows you to filter incoming trigger events for a specified bit range.

Min and Max values are inclusive
If only a Max is set, the trigger will execute on exact values matching the configured Max

Leave both Min and Max blank to trigger on all values.

Learn about the Always Run option for range triggers below

Text

Text field configuration can be used to filter incoming triggers based on arbitrary text values.

Text Box Trigger Configuration

For example, the Global Variable Updated Trigger allows you to filter incoming trigger events based on a specified variable name.

This field can be left empty to trigger on all values.

Context Menu

Right-Click any existing trigger to reveal additional context menu options:

Test Trigger

Send a test execution of the selected trigger

Read more about Testing Actions below

Edit Trigger

Open the configuration dialog for the selected trigger

Copy Trigger

Copy the selected trigger to the clipboard

This creates a Base64 string intended to be pasted into other actions, but it can also be sent to notepad or any other computer to be imported into another instance of Streamer.bot

Paste Trigger

Paste a copied trigger into the selected action

Delete Trigger

Delete the selected trigger

This will show a confirmation dialog by default

Enabled

Toggle this trigger on or off.

Refresh Triggers

Reload criteria data for all triggers

This is useful if you have modified data elsewhere in Streamer.bot, and it is not showing up in the trigger dialog

Clear All Triggers

Remove all triggers from the selected action

Enable All Triggers

Enable all triggers for the selected action

Disable All Triggers

Disable all triggers for the selected action

Always Run

Always execute this trigger, even if another matching trigger has been configured elsewhere with an overlapping range.

This is a special option that only applies to range triggers

For example, if you have a Twitch Cheer Trigger setup to execute on any value, and another setup to execute on exactly 100 Bits:

  • Enabling Always Run will allow both triggers to execute
  • Disabling Always Run will only execute the Any trigger if the bit value does not equal 100 Bits
You can quickly recognize triggers configured to Always Run by their blue color

Viewer

You can click the ? icon in the top-right of the triggers panel to open the Trigger Viewer

This window gives you a quick overview of all your configured triggers and their action mappings.

Testing

You can use triggers to easily test your actions and their behavior against various arguments.

The quickest way to execute a trigger is by selecting Test Trigger from the context menu.

For more control over variables while testing, you can use the Core > Test Trigger utility to define custom arguments, or send Simulated Events

Simulated Events

Documentation Needed
Simulated Events documentation needed (Coming in Streamer.bot v0.2.2)
Contribute on GitHub

Advanced

Custom Triggers

Custom Triggers require C# Code to register and execute

You can define your own triggers using C# Code, which will then show up in the trigger menu UI under Custom.

custom-trigger

// Register a new trigger labeled "Game Win" in the "Game Result" category
CPH.RegisterCustomTrigger("Game Win", "gameResultWin", new[]{"Game Result"});
Read more in API > C# > Core > Triggers