La_Syl Studio
Widgets guide

Alerts

Follows, subs, cheers, raids, Super Chats and Streamer.Bot integrations like Ko-fi, one at a time with the viewer's picture.

Shows your channel's events one at a time, each with the picture of the person involved. Alerts are queued: if three subs land at once, they play one after the other. Any alert can also be posted to a Discord channel.

Platforms: Twitch, YouTube, Kick, and the integrations switched on in Connection (Ko-fi, Streamlabs, StreamElements…)

Action pack: Stream UI - Get Profile Pic for Twitch profile pictures, Stream UI - Sounds for sound files, Stream UI - Broadcast for the manual controls, Stream UI - Backend for Discord webhooks and the pause → Connection

The page

The widget's page works like a small app:

  • Settings, Style and Controls, the tabs over the editor, switch what it shows.
  • The column on the left lists the tab's sections — Alerts settings, Platform alerts and Integration alerts on the Settings tab. Click one to edit it in the main area. On the Controls tab, its controls and their triggers → Controls, and the Custom alerts guide.
  • Platform alerts opens a column of its own: Twitch, YouTube, Kick. Integration alerts does the same with each integration switched on (listed only while one is, in Settings › Streamer.bot).
  • A source opens its Alert list: one row per Streamer.Bot trigger, with its condition under it. Add trigger adds one; a row's menu duplicates it (the same trigger with another condition) or deletes it. The picked alert is edited in the main area.
  • Widget preview, the panel against the window's right edge: the preview, the test buttons and the widget's own URL. The arrow at the top folds it to a slim rail. Drag its left edge to widen it, up to half the window; it keeps its width. Widget shows the widget in its position, cut from the canvas as your browser source draws it; On canvas, the whole canvas.

Settings

Alerts settings

Three parts, each under its heading: Display settings, Platform icon and Discord webhooks.

SettingDefaultDetail
Time on screen8 sDisplay settings: how long each alert stays, from 2 to 30 s.
Show platform icononThe logo of the platform or integration the alert comes from, pinned inside the card.
Position in the cardMiddle rightBeside it, while it is on: the spot of the card the logo is pinned to, any of the eight around its edge.

Discord webhooks

The last part of Alerts settings: posts alerts to a Discord channel through Streamer.Bot — a follow, a sub, a Ko-fi donation announced on your server. Post alerts to Discord, under its heading, turns it on (off by default) and shows its settings; you pick which alerts with Post to Discord in each alert.

SettingDefaultDetail
Webhook URLemptyThe channel's webhook. Save keeps it in Streamer.Bot; Send test posts a test message.
Default usernameStream UIThe name messages are posted under when they are not posted as the viewer, or the viewer can't be found.
Default picture URLemptyThe picture that goes with it. Empty: the webhook's own picture, set in Discord.
Post as the vieweronPosts with the name and profile picture of the person who set the alert off. Off, or when they can't be found: the default username and picture above.

To get the webhook URL, in Discord: channel settings › Integrations › Webhooks › New Webhook › Copy Webhook URL.

The webhook URL is kept in Streamer.Bot only (a persisted global variable), never in your settings or your browser source's link: anyone holding it can post in your channel. Setting it needs Streamer.Bot connected and the Stream UI - Backend action.

Then, in each alert to post, switch Post to Discord on; Discord message settings, on its right, opens Discord message: Reuse the chat message, on by default, posts the same message as the row's chat message; off, write a Discord message of its own, with the same variables as the alert's text.

Save Discord message keeps it. Like chat messages and sounds, Discord messages are sent by the overlay that runs the actions only, never by other overlays, a single-widget URL or the preview.

An alert

The picked alert, in the main area: its trigger's name at the top, Change trigger to pick another trigger or condition, then its settings in five parts: Overlay settings (Title, Text), Viewer details (the picture), Chat message, Discord webhook and Sound settings:

FieldDetail
TitleThe alert's first line.
TextThe second line, with the event's own variables. The magnifier on its right opens the event inspector on its trigger; the line under it links to Streamer.Bot's WebSocket documentation.
Use viewer profile pictureIts picture: on (the default), the person's profile picture; off, an image you upload. Picture settings, on its right, opens the picture's window.
Send a chat messagePosts a message in chat. Chat message settings, on its right, enabled while it is on, opens its window: Send as bot, the message and Post to.
Post to DiscordWhile Post alerts to Discord is on: posts it to your Discord channel. Discord message settings, on its right, enabled while it is on, opens its window.
Play soundA file on your PC, a random file from a folder, or a link: Sound settings, on its right, enabled while it is on, opens the sound window.

How the picker, the conditions, the variables and the sounds work is on its own page → Triggers and conditions.

Empty both the title and the text to turn an alert off, or remove its row. Only rows with a text are listened to.

The default rows

Twitch

TriggerTitleText
Twitch.FollowNew follower{targetUser.name} just followed!
Twitch.SubNew subscriber{user.name} just subscribed!
Twitch.ReSubResub{user.name} resubscribed!
Twitch.GiftSubGift sub{user.name} gifted a sub to {recipient.name}!
Twitch.CheerCheer{user.name} cheered {bits} bits!
Twitch.RaidRaid{raider.name} is raiding with {viewers} viewers!

YouTube

TriggerTitleText
YouTube.NewSubscriberNew subscriber{user.name} just subscribed!
YouTube.NewSponsorNew member{user.name} just became a member!
YouTube.MemberMileStoneMember milestone{user.name} reached a membership milestone!
YouTube.SuperChatSuper Chat{user.name} sent {amount}!

Kick

TriggerTitleText
Kick.FollowNew follower{user.name} just followed!
Kick.SubscriptionNew subscriber{user.name} just subscribed!
Kick.ResubscriptionResub{user.name} resubscribed for {duration} months!
Kick.GiftSubscriptionGift sub{user.name} gifted a sub!

Integrations. When you switch an integration on, its list starts with one row for each of its triggers that names a person, titled with the integration and the trigger (e.g. Ko-fi Donation). The text names the person and the amount when there is one: Ko-fi donations read {from} sent {amount} {currency}!.

These integrations start with an empty list, for you to fill: HypeRate, Patreon, Pulsoid, Shopify, Speaker.bot, Streamer.bot Remote, Streamloots, Throne, T.I.T.S., Voicemod, VTube Studio.

The picture

Each alert picks its picture. An alert's Use viewer profile picture switch, on by default, says where its picture comes from. On: the person's profile picture. Off: an image you upload. Picture settings, on its right, opens Picture, where you upload it:

FieldDetail
ImageOnly while Use viewer profile picture is off. Upload an image, shown instead of the profile picture for this item only, shrunk to 256 px and saved in Streamer.bot (connected), not in your browser source URL. Remove the image takes it out.
StylePicture style: looks like the Picture of the Style tab. Custom: its own picture sections (position, size, border, padding, background colour, shadow, glow).

Save picture keeps it for that row; Reset takes the row's picture off: that alert then shows none. A custom alert shows the image it is sent with, if any.

YouTube and Kick send the profile picture with the event. Twitch does not: the browser source asks the Stream UI - Get Profile Pic action for it. Integrations use the picture their payload carries, when there is one. The website's preview never fetches pictures.

Style

The Style tab tunes each part of the alert — see Appearance for how it works:

ElementDetail
ContainerThe widget's box, clear by default: it lines up the card on the widget's position.
BackgroundThe card: the overlay's Widgets background at full width, its picture and texts centred across, 14 px apart. Its Direction is the Picture's side.
Images › PictureHow every alert's picture looks (each alert picks its image on its row), following the overlay's Profile pictures field by field: Alignment (Position in the card: Left, Right, Top, Bottom), then the picture sections.
Images › Platform iconThe logo of the platform or integration, pinned inside the card where Alerts settings say, following the overlay's Platform icons: the picture sections and Icon colour (One colour for every platform replaces each platform's colour). Listed while Show platform icon is on.
Text › Alert titleThe alert's first line (the overlay's Titles style).
Text › Alert textThe second line (the overlay's Secondary text style).
Show / hide transitionHow each alert appears and leaves. How long it stays is Time on screen (Settings).

Style for gives one platform or integration its own look: pick it, then change the fields you want. Everything else keeps following All.

Test buttons

Test buttons, in the Widget preview panel, has one button per alert, in a tab per source — e.g. Gift Subscription (months ≥ 12). Each plays an event that meets the row's condition.

Controls

On the widget page's Controls tab:

  • Controls, the column on the left, lists Pause, Resume, Skip alert and Clear queue, each with the names of its triggers. Pick one to see its triggers in Trigger list, beside it.
  • Trigger list: the Streamer.Bot triggers that do it — none by default, e.g. an ad break starting and ending, or a scene change. Add trigger adds one, conditions included → Triggers and conditions.
  • The main area shows Alerts: Running or Paused, with the buttons Resume and Pause, then the other buttons, all also in the controls window:
ControlWhat it does
Pause / ResumeHolds the alerts, then plays them → Pause and resume.
Send a test alertSends a custom alert through Streamer.Bot, to check your browser source receives alerts. Button only.
Skip alertThe alert on screen leaves; the next in the queue follows.
Clear queueDrops the alerts waiting; the one on screen ends normally.

The buttons need Streamer.Bot connected; Pause and Resume need Stream UI - Backend, the others Stream UI - Broadcast.

Pause and resume

While paused, the alert on screen ends its time, and new alerts wait in the queue instead of showing: none is lost. Their chat and Discord messages still go at once; their sound plays when they show. Resume plays the alerts that waited, one after the other — Clear queue first if you'd rather drop them. The waiting alerts are kept by the browser source: reloading it while paused drops them.

The state is kept in Streamer.Bot, in the persisted global streamUi.off.alerts (1: paused; 0 or none: running), so it lasts until you resume, even if the browser source reloads, and every overlay follows it at once. Your own actions can pause or resume the widget too, with a Global (Set) sub-action on that variable.

Custom alerts

Send alerts from your own Streamer.Bot actions — an achievement unlocked, a reward of your own. On the widget page's Controls tab, an info box under the buttons links here (Go to documentation).

Setup, once:

Create the action

In Streamer.Bot, create a new action named Stream UI - Send Custom Alert.

Add the code

Add a sub-action Core › C# › Execute C# Code, and paste this code in it. Click Compile, then Save.

using System;
using Newtonsoft.Json;

public class CPHInline
{
    public bool Execute()
    {
        // Sends a custom alert to Stream UI's overlays from this action's arguments
        CPH.TryGetArg("title", out string title);
        CPH.TryGetArg("text", out string text);
        CPH.TryGetArg("alertImageUrl", out string alertImageUrl);
        CPH.TryGetArg("platform", out string platform);

        var alert = new
        {
            @event = "customAlert",
            title = title ?? "",
            text = text ?? "",
            alertImageUrl = alertImageUrl ?? "",
            platform = platform ?? ""
        };
        CPH.WebsocketBroadcastJson(JsonConvert.SerializeObject(alert));
        return true;
    }
}

How to use it, in any action — a command, a channel point reward…:

  1. Add Core › Arguments › Set Argument sub-actions for these arguments:
ArgumentValueDetail
titletextThe first line of the alert.
texttextThe second line.
alertImageUrlimage URLAny picture to show on this alert (a badge, a GIF, a photo…). Without it, the alert shows your uploaded image, or none.
platform (optional)twitch, youtube, kick or an integration (kofi…)Shows that platform's icon and uses its style. Leave it out for the general alert style.
  1. Add a Core › Actions › Run Action sub-action that runs Stream UI - Send Custom Alert.
Set Argument  title = Achievement unlocked
Set Argument  text  = 100 hours streamed!
Run Action    Stream UI - Send Custom Alert

Custom alerts join the same queue, without a chat message or a sound.

Default position

Position Bottom centre, as wide as the position, size 100 % — changed on the Overlay builder's Layout tab.

Streamer.Bot events it listens to

The trigger of every row with a text, for the platforms on and the integrations switched on, the Pause, Resume, Skip alert and Clear queue triggers you picked, plus General.Custom for custom alerts, the buttons and Twitch profile pictures, and Misc.GlobalVariableUpdated / Misc.GlobalVariableCreated for the pause switched elsewhere.