📜TSL Events & Predicates
What are possible events and their predicates?
TSL events are implemented following various streaming platforms' Socket API Documents. Every event served by those APIs is accesible by TSL. As the syntax rules require, events must come after ON
keyword, and predicates (if any) must be chained after WITH
word(s). Predicates cannot come before event declarations, the order is strict.
Currently supported platforms:
Streamlabs - Their API documentation
StreamElements - Their API documentation
❌ ... WITH amount >= 10 ON Donation ❌ ... ON Donation amount >= 10 amount <= 20 ✅... ON Donation WITH amount >= 10 WITH amount <= 20
Using invalid predicate properties will not cause any fatal error nor count as a syntax error. However, the rule might not work as expected.
(E.g using donation_amount >= 10
predicate with Twitch Follow
event might cause related action not to be performed)
While writing rules which has some intersecting predicates, their order shall be considered. Only the very first rule passing all the declared predicates will be performed. For example:
Event: Donation
When: Occurs when someone donates streamer. (Also refers to tips
on StreamElements)
Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Lorem ipsum dolor |
amount / donation_amount | Amount of the donation | 15.0 |
currency / donation_currency | Currency of the donation | USD |
Streamlabs | StreamElements | |
Supported by |
Event: JustGiving Donation
When: Occurs when someone donates using JustGiving integration. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Lorem ipsum dolor |
amount / donation_amount | Amount of the donation | 15.0 |
Streamlabs | StreamElements | |
Supported by |
Event: ExtraLife Donation
When: Occurs when someone donates using ExtraLife integration. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Lorem ipsum dolor |
amount / donation_amount | Amount of the donation | 15.0 |
Streamlabs | StreamElements | |
Supported by |
Event: Patreon Pledge
When: Occurs when someone pledges using Patreon integration. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Lorem ipsum dolor |
amount / donation_amount | Amount of the pledge | 15.0 |
Streamlabs | StreamElements | |
Supported by |
Event: Tiltify Donation
When: Occurs when someone donates using Tiltify integration. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Lorem ipsum dolor |
amount / donation_amount | Amount of the pledge | 15.0 |
Streamlabs | StreamElements | |
Supported by |
Event: TreatStream Treat
When: Occurs when someone treats using TreatStream integration. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
title | Title of the Treat | My Treat |
amount / donation_amount | Amount of the pledge | 15.0 |
Streamlabs | StreamElements | |
Supported by |
Event: Loyalty Point Redemption
When: Occurs when someone redeems a Loyalty Point item. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Lorem ipsum dolor |
title | Title of the Redemption item | My Redemption Item |
Streamlabs | StreamElements | |
Supported by |
Event: Twitch Channel Point Reward
When: Occurs when someone claims a Channel Points reward Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor, if any | Lorem ipsum dolor |
title | Title of the Reward. (Case-sensitive) | My Test Reward |
Streamlabs | StreamElements | |
Supported by |
Event: Twitch Chat Message
When: Occurs when someone sent a message on the chat. (See Chat page for more info) Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Hello World! |
months / month_count / subscription_months | How many months did the actor is subscribed for. 0 if they are not a subscriber | 0 |
badges / chat_badges | A list of the badges owned by the actor | ["moderator", "vip", "broadcaster"] |
Streamlabs | StreamElements | |
Supported by |
Event: Twitch Follow
When: Occurs when someone follows streamer on Twitch. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
Streamlabs | StreamElements | |
Supported by |
Event: Twitch Subscription Gift
When: Occurs when someone gift some amount of subscription on Twitch. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
amount | Count of subscription gifts | 3 |
tier / subscription_tier | Tier of subscription (Classical 1, 2, 3 or 0 for Prime) | 2 |
Streamlabs | StreamElements | |
Supported by |
Event: Twitch Subscription
When: Occurs when someone subscribes to streamer on Twitch. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Lorem ipsum dolor |
months / month_count / subscription_months | Count of subscription months | 3 |
tier / subscription_tier | Tier of subscription (Classical 1, 2, 3 or 0 for Prime) | 2 |
gifted | Indicarted whether this subscription is gifted or not | true or false |
Streamlabs | StreamElements | |
Supported by |
Event: Twitch Host
When: Occurs when someone hosts streamer on Twitch. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
viewers / viewer_count | Count of viewers | 100 |
Streamlabs | StreamElements | |
Supported by |
Event: Twitch Raid
When: Occurs when someone raids streamer on Twitch. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
raiders / raider_count | Count of raiders | 200 |
Streamlabs | StreamElements | |
Supported by |
Event: Twitch Bits
When: Occurs when someone donates streamer bits on Twitch. Valid Predicates:
Predicate Property | Property Description | Exemplar Value |
actor | Actor of the event | iGoodie |
message | Message of the actor | Lorem ipsum dolor |
amount / donation_amount | Amount of the donation | 1500 |
Streamlabs | StreamElements | |
Supported by |
Event: Youtube Subscription
Event: Youtube Sponsor
Event: Youtube Superchat
Event: Mixer Follow
Event: Mixer Subscription
Event: Mixer Host
Last updated