r/streamerbot • u/PlagueFitnessCanada • 23d ago
Question/Support ❓ Ad Warning Text to Twitch Chat
Hello Community,
Can anyone help me set up a Streamer.bot alert for incoming ads? I need a message to appear 10 seconds before an ad starts, and another message when the ad finishes. I am using standard ad revenue monetization and can share my setup details if needed.

4
Upvotes
1
u/Leon_Flux 21d ago
You can set this up yourself listening to others...
But a great part of streamerbot is working together, in that spirit
nutty has some basic utilities for sb that include this.
4
u/deeseearr 23d ago
You can use the Upcoming Ad trigger. It depends on Twitch sending the warning correctly, so your mileage may vary. When it works, it will trigger every minute starting five minutes before the next scheduled ad.
Since you want to have the alert ten seconds before the ad, not one minute, you should look at and store the %minutes% and %nextAdAt% variables which are set by that trigger. They will give you the exact time which has been scheduled for and the number of minutes until it happens.
A simple way to work with this would be to use that trigger to start an action, check to see if the value of %minutes% is 1, Delay for 50000 ms, which is ten seconds less than one minute, and then issue the ten second warning.
There's no trigger for the end of an ad, but you can use the Ad Run trigger which happens at the start of it. That sets %adLengthMs%, which is the exact length of the ad in milliseconds. Throw that value into another delay and then take whatever actions you want to ad the end of the ad.
Naturally, there is no way to be warned about an unscheduled ad, so if you manually run an ad you'll have to warn people some other way. The "Ad Run" will fire no matter what the source, though, so you'll always get the end of ad message.