igoodie.gitbook.io
Open in
urlscan Pro
2606:4700:4400::6812:282f
Public Scan
URL:
https://igoodie.gitbook.io/twitchspawn/twitchspawn-language/tsl-events-and-predicates
Submission: On September 13 via api from US — Scanned from DE
Submission: On September 13 via api from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
TwitchSpawn Minecraft 1.17.x Minecraft 1.16.xMinecraft 1.12.2Minecraft 1.18.xMinecraft 1.17.xMinecraft 1.14.x More SearchCtrl + K * 💿Introduction * 💿Mod Page * 📹Tutorial Video Series * 👾Discord Server * 🌲Change Logs * Basics * 📘Getting Started * 📗Configuring Credentials * 📗Creating Basic Ruleset * 📗Starting the Mod on Server * 📘Customizing Messages * 💿Minecraft JSON Text Components * 💿Minecraft Tools * TwitchSpawn Language * 📜TSL Basics * 📜TSL Events & Predicates * 📜TSL Comparators * 📜TSL Actions * 📝Notepad++ Syntax UDL * Reference * 📕Configurations * 📄credentials.toml * 📄messages.title.json * 📄messages.subtitle.json * 📄rules.xxx.tsl * 📄preferences.toml * 📕Commands * 📕Chat * Cookbook * Collaboration * 💻Source Code * 💻Submit an Issue Powered by GitBook 📜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: Copy DROP apple ON Donation WITH amount >= 10 DROP stick ON Donation WITH amount >= 20 # A donation with 20 USD will end up dropping apple # A donation with 30 USD will also end up the same # However a donation with 10 USD will end up dropping a stick 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 example Copy ... ON Donation WITH amount IN RANGE [0,10] WITH currency = USD # Not even necessary 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 example Copy ... ON JustGiving Donation WITH amount IN RANGE [0,10] WITH title IS %My Redemption Item% 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 example Copy ... ON ExtraLife Donation WITH amount IN RANGE [0,10] 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 example Copy ... ON Patreon Pledge WITH amount IN RANGE [0,10] 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 example Copy ... ON Tiltify Donation WITH amount IN RANGE [0,10] 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 example Copy ... ON TreatStream Treat WITH title IS %My Treat% 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 example Copy ... ON Loyalty Point Redemption WITH title IS %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 example Copy ... ON Twitch Channel Point Reward WITH title IS %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"] example Copy ... ON Twitch Chat Message WITH message PREFIX %!command% WITH months >= 1 # A.k.a actor is a sub ... ON Twitch Chat Message WITH badges CONTAINS moderator Streamlabs StreamElements Supported by ✅ ✅ 📕Chat 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 example Copy ... ON Twitch Follow 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 example Copy ... ON Twitch Subscription Gift WITH amount >= 10 WITH tier = 1 # Tier 1 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 example Copy ... ON Twitch Subscription WITH months >= 10 WITH tier = 1 # Tier 1 # WITH tier = 0 # Tier 0 means Prime WITH gifted IS false # Means it should be a non-gifted sub 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 example Copy ... ON Twitch Host WITH viewer_count > 500 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 example Copy ... ON Twitch Raid WITH raider_count IN RANGE [0,100] 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 example Copy ... ON Twitch Bits WITH donation_amount IN RANGE [1000,1500] Streamlabs StreamElements Supported by ✅ ✅ EVENT: YOUTUBE SUBSCRIPTION EVENT: YOUTUBE SPONSOR EVENT: YOUTUBE SUPERCHAT EVENT: MIXER FOLLOW EVENT: MIXER SUBSCRIPTION EVENT: MIXER HOST PreviousTSL BasicsNextTSL Comparators Last updated 2 years ago On this page * Event: Donation * Event: JustGiving Donation * Event: ExtraLife Donation * Event: Patreon Pledge * Event: Tiltify Donation * Event: TreatStream Treat * Event: Loyalty Point Redemption * Event: Twitch Channel Point Reward * Event: Twitch Chat Message * Event: Twitch Follow * Event: Twitch Subscription Gift * Event: Twitch Subscription * Event: Twitch Host * Event: Twitch Raid * Event: Twitch Bits * Event: Youtube Subscription * Event: Youtube Sponsor * Event: Youtube Superchat * Event: Mixer Follow * Event: Mixer Subscription * Event: Mixer Host Was this helpful?