Streamer.bot v1.0.5
What's new in Streamer.bot version 1.0.5
It's that time again, another Streamer.bot beta is upon us!
The biggest change for this beta is the removal of the Twitch IRC connection and switching over to EventSub for the last remaining events.
As always, these are beta releases, they should be fairly stable, but since there are more users testing, things that fell through the cracks before may make their prescence known this time around.
Breaking Changes
With finally moving Twitch Chat from IRC to EventSub, the legacy Message object in a Websocket payload has finally been removed, as it has been deprecated for a while.
New Features
- New save routines for data files
- Move Twitch chat handling from IRC to EventSub
- Move Twitch Watch Streak event to EventSub
- Add handling for YouTube's Jewel Gifting events
- Add new trigger for YouTube Jewels Gifted
- Add new C# method, KickDeleteMessage
- Streamer.bot's HTTP Server is now using Kestrel
- Add a new Twitch Pyramid option, Shared Chat Participation
- Handling and tracking for First Message is now handled internally
- Set culture info based on system culture for all existing and new threads
- Updates to variable/method parsing
- Add Twitch Custom Power-Ups
- Add a data repo for YouTube
- Add YouTube Super Chats, Super Stickers and Jewels Gifted to new YouTube data repo
- Split
YouTube User Bannedtrigger intoUser BannedandUser Timedout - Add
Durationcriteria toYouTube User Timedouttrigger - Add 'Count
criteria toKick Mass Gift Subscription` trigger - Add a follow check to
Kick Followtrigger, behaves the same way asTwitch, limits triggering to once per run - Add support for
Twitch Message Pinning - Add 4 new sub-actions for
Twitch-Get Pinned Chat Message,Pin Chat Message,Update Pinned Chat Message Duration, andUnpin Chat Message - Add 5 new
C#methods to supportTwitch Message Pinning - Add polling for new
YouTube Subscribers, this check will happen every 10s - Add new integration
Streamloots - Add 4 new triggers for
StreamLoots - Add new integration
StreamFog - Add 6 new sub-actions for
StreamFog - Add settings for
Font FamilyandFont Sizein theExecute C# Codedialog - Save and Restore
Font FamilyandFont Sizein theExecute C# Codedialog - Add supoport for
StreamDeck MCP Server - Add new sub-action to trigger a button on the
StreamDeck MCP Deck - Add an internal
WebView2caching service to help speed up loading ofExecute C# Codedialog - Add new triggers for
Twitch ModiversaryandTwitch Shared Modiversary - Add support for
Streamfog'snewVideo Backgrounds - Add new sub-actions for adding and removing suspicious status to/from a user
- Add the ability to double click to edit a
Queue - Add some hotkeys to the queue page
- Add a new
C# Method,string Parse(string text, Dictionary<string, object> args = null); - Add a new command switch,
/resetwindow, which will not apply saved window position on startup, in case the window is off the screen - Add a new setting to
Custom Websocket Server,IgnoreExtensions, defaults to true - Add a new setting to
Custom Websocket Clients,EnableCompression, defaults to false - When no credentials exist for
Twitchadd ability toCopy Login Urlto start authorization flow - Add support for
Throne - Add 3 new triggers for
Throne - Start keeping track of
Kicks Giftedin theKickdata repo - Add a
Twitch Viewer'sraid stats to User Information - Add some
Kickstats to a Viewer's User Information (Channel Points Spent,Kicks Gifted) - Add some
YouTubestats to a Viewer's User Information (Super Stickers,Jewels Gifted) - Add a new startup argument,
/nologin, this will bypass trying to login to Streamer.bot integration on startup - Add 2 new sub-actions,
Logic Loop Continue, andLogic Loop Break - Add supprt for
Twitch Giffragment type - Add a new command switch
/nowebview2which will disableWebView2for the entire application - When handling WebView2, anything other then windows will either fallback, or no longer load, this may change
- Add a new setting in
Settings->Genereal,Use Monaco Editorthat defaults to true
Updates
- General cleanup, and optimizations
- Remove Trovo platform
- Add new scope for Kick, you will need to re-login
- Update some Kick Trigger Test methods
- Update the error message shown when there is a mismatch in scopes for most services
- Add some additional connection check logic for Kick
- Add some additional logging in various spots
- Add commandLocation argument to Commands
- Update Kick commandType to message
- Move Twitch SubCounter handling to Twitch EventSub events
- Move Twitch Credit event handling to Twitch EventSub events
- ExecuteCodeTrigger Websocket method passes arguments to the Websocket event payload broadcast
- Update Kick Categories API to use v2 endpoint
- Some general cleanup, trimming unused/old code
- Update websocket-sharp, re-sync the codebase to latest
- Re-work parsing for variables and functions app wide
- Add some missing arguments to
Twitch Followtrigger, and updateWebsocketpayload - Add missing
%count%toKick Mass Gift Subscriptiontrigger - Add
Twitch Channelinfo for theBroadcasterwhen usingTwitch Add Broadcaster Infosub-action Twitch Channelinfo will be added automatically alongside existingBroadcasterdata when aTwitchbased trigger occurs- Add
Kick Channelinfo for theBroadcasterwhen usingKick Add Broadcaster Infosub-action Kick Channelinfo will be added automatically alongside existingBroadcasterdata when aKickbased trigger occurs- Update
Execute C# MethodUI dialog,Execute C# Codesub-action list is now sortedA-Z - Update
Execute C# MethodUI dialog, will only listpublicmethods, and sort themA-Z - Update
Execute C# MethodUI dialog, both combo boxes are now text searchable Twitch Send Messagesub-action has been updated with a newPinoption- Update
YouTube New Subscribertrigger to come fromYouTubeand no longer needingStreamElements - Update
Monacoused inExecute C# Codeto 0.55.1 - Request new
Twitchscope to manage suspicious users - Update
SubActionandTriggerdialogs to include the hierarchy - Add a
messagesetting toTwitch Cheer Simulate - Add a
createdAtargument to someTwitchtriggers - Update how
WebView2is initialized forChatandEventwindows - Update how
WebView2is initialized forRelease NotesandUpdate Informationdialogs - Update how
WebView2is initialized for theExecute C# Codedialog - Update how
WebView2crashes are handle and recover/reinit the component - Start migrating from Newtonsoft.Json to System.Text.Json
- Update internal
Twitchlibraries to improve performance - Add a
broadcasterproperty to mostTwitchwebsocket payloads - Tweaks to internal
YouTube APIlibrary - Add some additional wording to
Twitch Gift Subtrigger - Some optimizations to config saving routines
- Some optimizations to underlying
Viewerobjects to use a bit less memory - Optimizing loading of
usersfile, when upgrading from1.0.4should load much faster, as well as any previous version - Some under the hood performance improvements related to
Viewerhandling - Add some extra wording to
Logic If/Elsesub-action dialog - Migrate
Twitch Automatic Reward Redemptiontriggers forPower Upsto their own new trigger - Migrate
Twitch Power Uprelated data from twitch data file to their own tables Twitch Automatic Reward Redemptionwebsocket payload has been updated- Add missing
Endpointconfig option forSpeaker.botintegration - Add
%streamId%toTwitch Stream Offlineevent - Add new
Twitch Power Up Redemptiontrigger - Update
Twitch Add Target Infoto provideaddTargetResultin all cases and no longer break a running action - Tweak text in StreamDeck Integration page
- Update and optimize
Pally.ggclient - When starting the
Websocket Server, enableIgnoreExtensionsoption - Update
Twitchto use new authentication handler - Defer loading of
Twitch Emotesto speed up overallTwitch Broadcasterlogin - Internal tweaks to
Twitch Present Viewerstick - Add some timing information in some log entries
- Update some log entries to be a bit more informative as to which service they belong to
- Updates to
Twitch EventSubconnection routines, and retry handling - Add
TierIdproperty toFourthwall Subscriptionevent - Tweaks to how shutdown is handled, and cleaning up services/classes
- Some performance improvements and updates to
Viewerstab - Update
Streamer.bot Website Integraionclient - Update all Streamer.bot Website API handling to hopefully be a bit more resilient
- Enable the
ReuseAddressproperty on all Websocket Sharp based servers, this may fix some issues when the underlying OS is hanging onto the port - Improve
Starting/Stoppingof theWebsocket Server - Properly clear some properties when logging out of
Twitch BroadcasterorBotaccounts Websocket Serverwas updated to useKestrelCustom Websocket Serverswere updated to useKestrel- Update internal handling of sub-action results to be more robust
- Update
Logic Whileto support the use of theLogic Loop ContinueandLogic Loop Breaksub-actions - Update
Set Argument, theVariable Namenow supports parsing - Tweak logging to roll over when file size limit is hit
- Update
Twitch Viewer Countbackground thread - Update
Kick Apihandling of responses to log malformed responses and not crash - When an invalid backup path is found on startup, revert back to the default backup folder
- Update local backup routine to be more resilient to crashes
- When manually doing a
Local Backup, add notification on success and failure - When doing a
Cloud Backup, add notifications on success and failure - Update underlying dialog for Release Notes and Important Information to use WPF native elements for Markdown instead of instantiating WebView2
- Update
OBS Rawsub-action to useAvalonEditfor showing JSON - Update
VTubeStudio Send Raw Requestsub-action to useAvalonEditfor showing Json - Update
Execute C# Codesub-action to useAvalonEditfor the fallback editor - Update
TwitchEmote Handlersto be enabled/disabled dynamically, no longer requiring a restart to enable/disable them - Add
%count%argument toKick Mass Gift Subscriptiontrigger test method - Update
Elgato CameraHubclient connection methods to be more robust - Update
VoiceModclient connection methods to be more robust, and support the multiple ports thatVoiceModcould be listening on - Some optimizations and tweaks to
YouTubebackground monitoring tasks - Some tweaks to
Commandspage in the UI - Some tweaks to
Twitch Channel Rewardspage in the UI - Some tweaks to the
Actionspage in the UI - Some tweaks to loading Actions
- Remove some margins, some list/tree items are a bit more condensed now
Fixes
- Fix OBS Set Color sub-action dialog Test button
- Fix setting the blocking state of the Default Queue not applying until restart
- Fix Streamer.bot Remove Instance Disconnected trigger adding a Connected trigger
- Fix a crash related to using
Logitech SetPointand horizontal scrolling - Fix a crash when trying to search for users from some dialogs
- Fix Twitch EventSub Connect button not updating correctly when retrying
- Fix crash when clicking ? in Twitch Raid trigger dialog
- Fix Kick not being initialized when running headless
- Fix YouTube Gift Membership Received event not setting the Tier
- Fix potential crash when testing Kick Reward Redemption
- Fix Voice Control Confidence Threshold setting in the UI
- Fix a UI issue in Platforms -> Kick
- Fixes to Kick Chat Client connection check methods
- Fix toggling Persist User Counter for Kick Channel Rewards, UI was misbehaving
- Fix Confidence Threshold for Voice Control -> Settings
- Fix Twemoji handling, there were some cases where images were not being set correctly
- Fix when
Importing Queuesnames were not overwritten correctly - Fix issue when handling new
QueuesinImports - Fix removing a default
YouTubetag not updating the UI - Remove the
TwitchBroadcastUpdateevent, this should have beenTwitchStreamUpdate - Handle a potential crash when encountering an unknown
YouTube Super Sticker - Fix a potential crash when handling the
YouTubenew subscriber thread - Fix some potential UI crashes when shutting down
- Handle
Desktop composition is disablederror, and silently swallow it, allowing WPF to try and recover on its own - Fix
sGiftedevent type in websocket, should beKicksGifted, fixed an over zealous string replacement - Fix
Speaker.botintegration page not updating states correctly - Fix
Twitch Timeoutevent, was not properly adding a user, so there were instances where the user could be null - Fix handling of a
ViewersLastActiveandPreviousActiveproperties, deserialization was causing some unpredictable results - Fix a potential crash when parsing invalid json form
Twitch API - Fix a potential crash when trying to add a
Viewerwith invalid data fromYouTube - Fix potential crash in
Twitch Set Channel Tagssub-action dialog when double clicking a tag to remove - Fix a crash related to
Twitch Power-up Celebrationevents - Fix a potential crash in handling of
Viewer Countupdates forTwitch - Fix a potential crash in
Twitch Rewardbase sub-actions, when there are no rewards and clickingOk - Fix init in
Twitch Rewardbase sub-actions to ignore null entries - Fix a potential crash when handling
Kickevents - Fix potential crashes related to anonymous
Twitchusers - Fix a potential crash in
Twitch Automatic Channel Reward Redemption, a value could be null that wasn't expected - Fix a potential index out of range crash related to getting random items from arrays
- Fix a potential crash when no user file exists
- Fix potential crash when a backup path is invalid
- Fix a potential crash when handling relative references in editing an
Execute C# Codesub-action - Possibly fix a potential crash related to Automation while running under Wine
- Fix the color displayed in the
OBS Set Color Source Colorsub-action dialog, was not handling alpha channel correctly
Details
System.Text.Json
I've started updating some of the internal libraries to use System.Text.Json instead of Newtonsoft.Json. For the most part this will be a transparent change, and the first library that got an overhaul was Twitch.
HTTP Server
The internal HTTP server has been udpated to use the more modern Kestrel packaging. The biggest benefit of this is the net sh command is no longer needed and should work for any IP, port, etc. As well as speed and handling improvements.
Websocket Server
I hadn't planned on doing an update to Kestrel for the Websocket Server just yet, but with the tweaks I did on Thursday/Friday not fully working as I had intended, instead of just reverting these, I just updated the Websocket server to Kestrel.
The reason for this update, I am starting to migrate away from websocket-sharp to newer libraries.
Data Files
Yes, I know, the file corruption is a nusence, it's been my top priority for a while. Saving data files is one of the most basic operations within Streamer.bot, so the file corruption has been puzzling and I will continue to try and resolve this. With this release there is some new handling that may take care of the corruption due to split second file locks the could've caused issues.
StreamDeck MCP
There is now full support for the StreamDeck MCP Server on the local machine.
Twitch
With Twitch finally adding Watch Streak to EventSub, it was time to move fully to EventSub. Streamer.bot is now full EventSub for all Twitch events.
The First Message flag is not available in EventSub data, the First Message data will now be tracked internally. Any users moving forward will be handled, and this will expand to Kick and YouTube in the future.
Twitch Custom Power-Ups
Twitch is starting to surface this feature in the API and in EventSub, however, there are only 2 usable endpoints at the moment.
So right now, there are no real-time updates when you add/edit/delete a Custom Power-Up, and there are no endpoints to add, edit or delete Custom Power-Ups.
When Twitch adds these endpoints, an update will likely follow with the new features.
Also note, in order to use these your channel must have access to Custom Power-Ups, since they are still in BETA not everyone is going to have access.
Custom Power-Ups will be retrieved when connecting to Twitch, and you can also right click in the Custom Power-Up list and refresh from Twitch within the UI
Twitch Message Pinning
Figures, Twitch releases new APIs on Friday, after I have finished for the weekend.
This alpha adds support for the new Message Pinning APIs.
There are 4 new sub-actions that can be used to manipulate pinned messages, as well, Send Message has been updated with a new Pin option, to send and pin the message. When this is enabled, you will only be able to enter 1 line of text, as you can only pin 1 message at a time.
There are also 5 new C# methods that can be used in your Execute C# Code sub-actions.
NOTE there are no events (yet) for when messages are pinned/unpinned
Twitch Power Up Redemption
In an effort to bring all Twitch EventSub subscriptions to their current versions, the handling of regular power-ups is no longer handled by the Automatic Reward Redemption trigger, instead, there is now a Power Up Redemption trigger. The unfortunate side-effect of this, is, it's no longer possible to test the Power Ups from Twitch, I'm hoping this may change in the future tho.
All data that is related to Power Ups has been migrated to new tables within the Twitch Data file.
Twitch Authentication Handler
Twitch gets to be the guinea pig for this one. I've added a new authentication handler, as the old one is/was quite old and rather rigid; for starters, the update uses Kestrel for the redirect callbacks, and there is also the ability to initiate a login, but provide the authorization URL to copy.
The UI for Twitch has received a small update, when you are not logged in, and there are no saved credentials, you can now initiate a login by copying the authorization URL to paste in whatever browser you choose. There is also still a button to just launch the default browser on your system. The timeout has also increased to 3 minutes, which is more than enough time for any MFA that you might need to do. You can also cancel an active authentication, instead of waiting for it to time out.
Eventually, this new handler will be used across all platforms, services and integrations that deal with OAuth, but at the moment, for testing purposes, only Twitch was updated to it.
New C# Methods
void TwitchSendAndPinMessage(string message);
PinnedMessageData TwitchGetPinnedMessage();
bool TwitchUnpinMessage();
bool TwitchUpdatePinnedMessageDuration(int? duration = null);
bool TwitchPinChatMessage(string messageId, int? duration = null);
bool TwitchAddActiveMonitoringSuspiciousStatus(string userName);
bool TwitchAddRestrictedSuspiciousStatus(string userName);
bool TwitchRemoveSuspiciousStatus(string userName);
List<TwitchUserInfo> TwitchGetVips();
List<TwitchUserInfo> TwitchGetMods();
There are also a handful of classes that have been added.
Trovo
Trovo is no longer offering Live Streaming services, as such, Trovo has been removed from Streamer.bot. The C# methods currently remain to minimize issues, but will also be removed by full release.ate your code accordingly and any shared code, as by release, these methods will be removed.
YouTube New Subscribers
I've removed the dependancy of StreamElements for the YouTube New Subscriber trigger, this now works completely from YouTube
Because it is using older APIs, this has to be polled, and I've currently set this at every 10 seconds, this may change between now and beta.
NOTE
You will not get a New Subscriber event for Users that have their Subscriptions Private, and/or if the Google account does not have a YouTube Channel created.
StreamLoots
New integration time! I know this has been requested for quite a while, well, non time like the present to get it added in.
With this, there are 3 new triggers:
Pack PurchasedPack GiftedCard RedeemedReaction
I know there are more events/alerts from StreamLoots, these are the ones I was able to send tests for from the StreamLoots website.
There are likely still some changes that will happen to the 3 triggers that have been added.
As a request, if you use StreamLoots on your stream, I would like your logs, even for the above 3 events, to make sure real events match what I was able to get from testing, and hopefully to get events that I was not able to get, like Tips and Auction.
Throne
A while back, Throne finally added the ability to send Webhooks, well, as of this release, the ability to create a Throne Webhook on the site has been added.
Just like Shopify, Patreon, Kofi, and Fourthwall, and now Throne, you can receive events from Throne to Streamer.bot. Due to the nature of webhooks, the website acts as a relay for these services, meaning you need to have your Streamer.bot logged in to be able to receive them.
Go ahead, and login to the website, go to your account, and Webhooks, and add your Throne webhook now.
The three new triggers for Throne are:
Gift PurchasedContribution PurchasedGift Crowdfunded
StreamFog
New integration time! This has been requested for a bit, and still requires some work with StreamFog to get it polished.
With this, there are 3 new sub-actions:
Activate LensActivate Lens by NameDeactivate LensActivate OutfitActivate Outfit by NameReset Look
This integration is still a bit fluid, and there maybe further changes.
WebView Component
How the WebView component is initialized has been updated across all dialogs that use it, as well as better crash handling if there are issues within, or the WebView process outright crashes, it will now present a loading screen as it re-initializes itself.
The Execute C# Code dialog for Monaco had a further update, aside from updating to 0.55.1 ESM builds; there is now a pre-load that happens on startup to prime a cached WebView component for this dialog so it is loaded instantly upon opening. This may turn into a setting in a future version as not everyone uses this dialog.
This dialog also allows you the set tthe font and font size for Monaco, and is saved and restored on subsequent uses.
New Hot Keys
While on the Queue page, there are 5 new hot keys available.
Delete- Delete the selectedQueueReturn- Edit the selectedQueueCtrl+Alt+A- Add a newQueueCtrl+P- Toggle the selectedQueue'spaused stateCtrl+B- Toggle the selectedQueue'sblocking state
New C# Methods
The following C# Method will allow direct access to the internal parsing engine, so you can parse variables, and use functions within C#
string Parse(string text, Dictionary<string, object> args = null);
Execute C# Code
The fallback editor has been changed from the plain text box to AvalonEdit, which provides syntax highlighting and basic intellisense capabilities. It will never be on par with Monaco, but provides something a bit better then a plain TextBox
There is a new setting in Settings -> General, Use Monaco Editor that is enabled by default, and will use the Monaco editor in the Execute C# Code sub-action if possible. If this setting is turned off, it will always fall back to the AvalonEditor.
Actions Page
With this update, I applied some tweaks to the Actions list, and group handling both in the XAML as well as the code behind, I believe it should be a bit more responsive now, at least in my testing (I have 144 actions and a dozen groups) it felt more responsive.
I've also removed some margins, so the Actions list, Triggers list, and the Sub-Actions tree is a little bit more condensed then before.
The Sub-Actions tree was also updated, just some general tweaks and reorganization of XAML elements, I was also able to extend the right clickable are all the way to the right for each element, so you don't have to right click on the text parts only now to get the context menu for that sub-action.