Streamer.bot v0.2.5
What's new in Streamer.bot version 0.2.5
nate1280New Features
- Add a possibility of a prompt when creating triggers, if there are no criteria
- Add 2 new Twitch sub-actions,
Get Active Poll,Get Active Prediction - Add a new sub-action,
Set Trigger State - Add a new
User Interfaceoption toDisable Capturing of Variable Viewer Window, this requires the Variable Viewer to be re-opened after changing - Add new events related to groups
- Add 5 new Triggers for
GroupEvents - C# Method,
TryGetValuewill try to convert strings toGuid, whenTisGuid - Add Triggers for
HypeRate.ioConnected/Disconnected - Add new C# Method,
TwitchGetBlockedTerms - Add a new
userGroupargument for actions, that will contain a comma delimited list of the groups the user is in - Add new C# Method,
void TriggerCodeEvent(string eventName, string json) - Add some new internal methods for the
Chatwindow - Add a new sub-action,
Custom Event Trigger - Add a new sub-action,
Twitch Create Prediction - Add new integration for
mtion studio - Add 2 new sub-actions for
mtion studio - Add new context menu item to
Action History,Goto Action, that will go to the action that ran - Add a new argument,
oldSceneNameto theOBS Scene Changedevent/trigger, this will contain the previous Scene's name - Add 2 new
Speaker.bottriggers,ConnectedandDisconnected - Add new universal argument,
unixtime - Update
Twitch Send MessageandTwitch Reply To Messagesub-actions with better options - Update
Twitch C# Methodsrelated to sending messages to handle new fallback option. - Add new C# method,
GetCommands - Add a new streaming application integration,
Meld Studio! - Add 10 new sub-actions for
Meld Studio - Add 8 new triggers for
Meld Studio - Add 8 new C# Methods for Meld Studio
- Add a
Delete Confirmationwhen deletingTwitch Channel Rewards - Add
Short Cutkeys toTwitch Channel Rewardstab - Add new
returningChatterargument toTwitch Chat MessageandTwitch First Wordsevents - Implement more events in
Twitch Event Sublibrary - Add 4 new
EventsandTriggersforTwitch Prime Paid Upgrade,Pay It Forward,Gift Paid UpgradeandBits Badge Tier - Added 9 new
Twitch Shared Eventtriggers - Add new
bonusGiftsargument toTwitch Gift BombandTwitch Shared Gift Bombevents - Add a new
Labsfeature,Pending Action Cache! - Add new option for
Actions,Exclude from Pending Cache, this option exists in theContext MenuforActions - Add new
OBS Sub-action,Create Record Chapter - Add new C# method,
bool ObsCreateRecordChapter(string chapterName, int connection = 0); - Add 4 new
Twitch Predictionsub-actions, to cancel, lock and resolve predictions - Add some new
WebSocket Serverrequest methods to support features inDockable Chat - Add 8 new
WebSocketrequest methods for accessingGlobal Variables - Add handling for
Twitch Shared Moderatorevents - Add 5 new
Twitch TriggersforShared ModeratorEvents - Add
Authenticationoption toWebSocket Server - Add new
Twitch Shared Chatto sources forCommands - Handle commands that come from
Twitch Shared Chat - Add a new
GetUserPronounsWebSocketrequest forDockable Chat - Add 2 new
C# Methodsto turnTwitch Shield Mode OnandOff - Add
Verboselogging for incomingWebSocket Serverdata - Update
Streamlabs Websiteintegration to useOAuth - Add 3 new events
Application Events,Command Added,Command UpdatedandCommand Deleted - Add
year,month,day,hour,minute,secondsplit data as arguments toTwitch Get Follow Agesub-action - Nearly all lists with columns have their widths saved and restored
- Add handling of
YouTube Poll Closedevent - Add new
YouTube Poll ClosedTrigger - Add delete confirmation dialog when deleting a
Voice Control Command - Add
Deleteshortcut handling for theHot Keyslist
Updates
- Update YouTube New Subscription trigger to show a prompt, indicating StreamElements is required for it
- Add validation checks when creating a custom DonorDrive provider
- Update
LiteDBto5.0.21 - Add
input#variables toYouTubemessages - Add new option to
Folder Watcher,Add Changed Data - Release Notes dialog now properly follows links
- Messages that are sent from your
Twitch Botaccount within Streamer.bot, are now flagged as internal - Add a minimum width to the Action columns, so they can't accidentally be hidden
- Update how the creation of
Twitch Rewardsare handled, this means direct API calls will now show a new Reward - Update wording in
Perform Commandsub-action dialog, now saysTargetinstead ofCommand, same as a Windows Shortcut - Updates to YouTube Trigger test methods and providing properly named test data
- Add a new field,
Infoto1Twitch Badge` class, this will contain the subscribed duration - Add
MonthsSubscribedtoTwitch ReSub, andGift Subrelated events - Update
DonorDrive DonationTrigger, use DonorDrive's default Avatar Url indonarAvatarUrl - Add missing context menu items to the Trigger + button
- Add payload data to the Websocket events for Custom Event and Custom Code Event
- Small tweak to the
YouTube Broadcastcontext menu,Monitorhas been moved before thePrivacyandTagsitems - Add a
randomUserto theTwitch Charity Donationtrigger test - Tweak how
YouTube Statisticevent works, should be a transparent change - Add
YouTubebroadcast information to theWebsocketpayload for theYouTube CommandandYouTube Command Cooldownevents - Tweak to when an Event's Websocket message is sent
- Add special handling for C#
TryGetArgswhen dealing withGuid - When monitoring a
YouTubebroadcast that is not live, it will auto-unmonitor after 10 minutes to preserve quota usage. - Update some logging entries related to actions
- Update connection methods for
YouTube BroadcastandBotaccount to setup these 2 users - Internal tweaks to Queue handling
- Tweak to
mtion studioprocess detection - Update
OBS Set Image Source Fileto supportUrls - Some tweaks to
Elgato Camera Hubclient - Update
Twitch Announceto use the new UseBot and Fallback options - Some general cleanup
- Update the handling of
Twitch Gift SubandTwitch Gift Bombevents - Add handling of
Super ModeratortoTrovo, they are now treated as aModerator - Tweaks and fixes to internal handling of
Twitch Channel Rewards - Provide a better error message if adding a
Twitch Channel Rewardfails - When adding a
Twitch Channel Reward, the group of the reward or group selected is used by default - Add a
mnemonickey to the No button on the dialog prompt, pressingNwill dismiss it - Add a user's subscription tier to
Twitch Chat Message WebSocketpayload - Update
Twitch Chat Message, andCheereventWebSocket Payloadto a new format, the deprecatedMessageproperty will still exist - Some tweaks to internal methods used when looking up users
- Internal tweaks/fixes to parsing routines
- Update OS detection
- Update
WebSocketpayloads forTwitch Shared Chat Sessionevents Twitch Whisper,Twitch Announcement,Twitch Message Deletedand allTwitch Subscriptionevents are now handled byEventSub- Update
WebSocketpayload forTwitch Clear Chatevent - Update
Twitch First Wordsto use new WebSocket payload - Some tweaks to
Elgato WaveLinksub-action dialogs - Update
Find Refsto provide error details if it is unable to load assemblies, this is related to the fix above - Add
FadeTimetoVTubeStudio Set Expression Statesub-action - Update
VTubeStudioC# Method,bool VTubeStudioActivateExpression(string expressionFile, float fadeTime = 0.25f); - General tweaks to Streamer.bot instances list/handling
- Some minor refactoring to how
WebSocketrequests are handled internally - Add a source user object to
Twitch Sharedchat events, this contains the originating channel Variable Viewerapplies the filter forUser Variableswhen selecting a differentUserTwitch Chat Messagesthat are from aShared Chat, are only handled as messages, and no longer go throughCommand,Pyramid,Quote,Cheer, andFirst Wordshandling- When logging out of
Twitchaccounts, properly disable some timers that should not be running - When logging out of
Trovoaccounts, properly disable some timers that should not be running - Flag messages from
Inline Chatto no longer be internal, they will behave as if they came from outside of Streamer.bot - Update
WebSocket ServerSubscriberequest to be a bit more robust - Update handling of
Twitch/mechat messages, these are now sent via theAPIcall, and should be properly flagged internal - Tweaks to
Twitch Stream Updateevent - The
Twitch Botaccount no longer relies onTwitch Chat, instead, it connects toEventSubto handle any events it needs - Tweaks to
WebSocketservice handlers - Updates to
SendMessage WebSocketrequest forDockable Chat - Update
Seriloglogging to be threaded with async module, may gain performance improvements in high volume logging - No longer log Twitch EventSub KeepAlive related data
- Add an Id to Twitch EventSub logging
- Add some additional variables to
Twitch Reward Redemptionevent - Tweaks to S
treamlabs Desktop Client, the entire session is now cached and kept up to date in real time, improving some performance - Update
Streamlabs Desktop Clientto supportHorizontal/Verticalsources - Update some
Streamlabs Sub-actionswith a newHorizontal/Verticaloption, this defaults to both - Update some
Streamlabs C# Methods - Tweaks to
WebSocket Client Settingsdialog, better indication of disabled items - Apply a minimum width to most List Columns, so they can not be shrunk out of existence
- Remove API token from
Lumia Streamlogging - Remove API token from
CrowdControllogging, and tweak subscription code - Add a longer timeout (20s) for the initial
VTubeStudioauthentication, when it asks the user to authorize the plugin - Add
userProfileUrlvariable toYouTube New Subscriberevent fromStreamElements - Update
Twitch AutoModevents to new v2, which contains more data - Update
Twitch AutoMod HoldandTwitch AutoMod Updateevents to contain more arguments - Prevent editing
Midi In DeviceorMidi Out Deviceif the device is open - Update shortcut key handling for
Voice Control Commands - Add
subCounter.rollovertoTwitch Get Sub Countersub-action - For the
Headlessservice, disable theHot Keys Service, as there is no UI for it to correctly hook into to receive shortcut keys - Add a delete confirmation dialog when deleting
Hot Keys
Fixes
- Fix typos
- Fix a long standing bug related to
Authentication, this was not actually causing a crash - Fix potential crash during startup when checking for/creating application folders
- Fix Twitch Archive Poll sub-action showing Terminate instead
- Fix Read Random Line From File sub-action, Overwrite option was not being saved
- Fix
Ctrl+Alt+Cshortcut key, should now openChatagain - Fix changing the
Enabledstate when editing an action not being saved properly - Fix potential crash when adding a custom DonorDrive provider
- Fix potential crash when adding a DonorDrive provider with a non-numeric ID
- Fix
Midi InEvents context menu not working, you can nowEdit,Deleteand toggleEnabledagain - Fix
YouTube Commandevent,inputUrlEscaped#variables always had the full message - Fix potential crash in Execute C# Code editor when Finding Refs, and having a using statement not terminated properly
- Fix being able to add an empty named
GroupinC# - Fix potential crash when connecting to
Elgato WaveLink, handle some unexpected data - Fix not being able to upgrade from
0.2.0,0.2.1, and0.2.2 - Fix potential crash when handling
VoiceModevents - Fix unicode parsing issues in
Twitch Channel Points Automatic Rewardevent - Fix potential crash related to
Speaker.botintegration initialization - Fix potential crash when opening a
Streamer.bot Remotesub-action - Fix potential crash in
Throwing Systemclient when parsing data - Fix a
0.2.3to0.2.4upgrade issue with a lot of Commands and Counters, causing a slow upgrade - Fix C#
Twitch Get Clipsmethods - Fix
Perform Commandsub-action to properly capture STDOUT when aWait Timeis specified - Fix potential crash when initializing Trovo Moderators
- Fix potential crash related to Toast Notifications on Windows 7 (it's time to upgrade)
- Fix Set Trigger State sub-action dialog text
- Fix Set Sub-Action State sub-action dialog text
- Fix Refresh Triggers context menu item only working when right clicking on a trigger
- Fix potential crash in File Changed Events when unable to open the file
- Fix C# Method TryGetValue and properly handle Guid types
- Fix potential issue with right clicking within the Actions window
- Fix a potential UI crashes in
Perform Commandsub-action dialog - Fix a potential UI crashes in
Fetch URLsub-action dialog - Fix a potential UI crashes in
IFTTT Notification Advancedsub-action dialog - Fix a potential UI crashes in
PolyPop Trigger Alertsub-action dialog - Fix a potential UI crashes in
Test Triggerdialog - Check for empty data when sending a
Twitch Announcement - Fix potential crash when connecting to
Elgato CameraHuband requests timing out - Tweaks to
Twitch GetClips, and RFC3339 dates - Fix a potential crashes in
YouTube Gift Membership ReceivedTrigger test - Fix a potential issue when using C# method,
YouTubeGetBot() - Fix a potential crash within the internal event handling and collections
- Fix handling of
Streamer.bot Remotesub-actions when not connected to the website - Fix a potential crash when checking for an update
- Fix
OBS Event Trigger,Defaultentry was not showing correct version of events - Fix
Twitch Gift Subtigger, 1 month was not saving correctly - Fixes when handling cloning of
Dictionariesinternally - Fix backup, was missing the new
webview_settingsfile - Fix potential crash when selecting a
YouTubebroadcast updates the UI - Fix an internal issue/crash related to
OBS Events - Fix potential crash when retrieving data from
Streamer.bot Website - Fix potential crash when connecting to
Speaker.bot - Fix a potential crash in
Elgato Camera Hubclient - Fix an internal parsing error in
Elgato Camera Hubclient - Fix a crash that can happen when there is an exception in an
Execute C# Code'sconstructor method - Tweaks to
YouTubeconnection, and caching of certain data - Fix a potential crash, when trying to authenticate
YouTube BroadcasterandYouTube Botat the same time - Fix the potential for the wrong
OBS Sceneto be returned when changingOBS scenesafter a disconnection - Fix the
YouTube Present Intervalincorrectly altering the present viewer timer - Fix the
Twitch Present Viewer Intervalincorrectly altering the present viewer timer when not getting live data - Fix Twitch
Stream OfflineendedAtvariable not being in UTC - Fix Twitch
GetClipsForGameC# Methods - Fix a potential crash when handling some Twitch EventSub events
- Fix some settings for Twitch Rewards not saving properly
- Fix Twitch Stream Update event triggering on content classification changes
- Fix C# Method,
TwitchGetRewardUserCoutners, should return correct data now - Fix excess spaces defeating the Internal message checks for
Twitch - Internal tweaks/fixes for new events/payloads
- Fix being able to add no user, when adding a user in
Command Permissions - Fix the
Xclear button not working in theUser Searchdialog - Fix user selection, and context menu in Command dialog for the User Permission list
- Fix potential crash when connecting the
Speaker.botintegration to a port that is notSpeaker.bot's - Fix error prompt when unable to start the
WebSocketserver - Fix a potential crash when shutting down
- Fix a potential error when internally looking up a
Twitchuser in certain events - Fix a potential crash when testing the
Twitch Guest Star Updatetrigger, 2 random users are required - Fix a potential crash in the
Elgato WaveLink Set Filter Statesub-action dialog - Fix a potential crash when clicking
Find Refsin theExecute C# Codesub-action - Fix a potential crash when editing a
VTubeStudio Set Expression Statesub-action - Fix not being able to select
Defaultqueue inSet Action Queue Paused Statesub-action - Fix
Twitch Emote On/OffTrigger test having wrong variable - Fix
Twitch Repliessent from within Streamer.bot not being properly flagged as internal - Fix potential crash when emote is not found for
Twitch Gigantify Emote Automatic Reward Redemption, not even sure how this can happen - Fix some typos, add some new ones
- Fix a potential crash related to
Twitch First WordsandInline Chat - Fix a potential crash in
Twitch Channel Updateevent - Fix a potential crash in
VTubeStudio Trigger Hot Key by Namesub-action - Fix typo,
isSubscribed, in someTwitchevents - Fix handling of
7TVdupe bypass method - When forgetting
Twitch Broadcaster/Twitch Bottoken, clear some internal references that were never cleaned up - Fix a potential crash when handling
FourthWall Draw StartedandDraw Ended events - Tweaks to OBS authentication
- Fix a potential crash when dealing with
Commands - Fix a potential crash when trying to send a message on a closed
WebSocket Serversession - Fix a potential crash when closing
ChatorEvent Feedwindows - Fix a potential crash in
CameraHubclient with missing data - Fix a potential crash when handling
Trovo Present Viewertick - Fix a potential crash when handling
Trovo UIevents, and Streamer.bot is shutting down - Fix a potential crash in
TipeeeStreamwhen trying to send data to a closed socket - Fix a potential crash in
Elgato CameraHubwhen retrieving available WebCams, and the request times out - Fix
Twitch PredictionsandTwitch PollsUI, can no longer refresh these when theBroadcasteris not logged in - Fix not being able to start the
Websocket Serverafter encountering an error starting it - Fix missing constructors for some classes that get serialized/deserialized
- Fixes/tweaks to
WebSocket Service Subscriberequest - Fix a potential crash when testing
OBS RecordingorOBS Streaming,StartedandStoppedtriggers - Fix a potential crash when
Importing - Fix a potential crash in
VTubeStudio'smessage handling - Fix a potential crash when loading the list of
Editorsfor theTwitch Broadcaster - Fix a potential null ref when loading
YouTube Categorieswhen logging in, it will prevent the login now - Fix a potential crash when testing the
Twitch Reward Redemption Trigger - Fix a potential crash when
StreamElements Clientis trying to reconnect, but a user clicks theLogoutbutton - Fix a potential crash related to some
Twitch WebSocketpayloads and gift data - Tweaks/fixes to
Twitch Bot Event Sublogin methods - Fix
Twitch Viewer Count Updateevent not passing the viewer count parameter - Fix a potential crash in
WebSocketservice handling - Fix a potential crash when removing a
Commandfrom anExportthat no longer exists - Fix a potential crash when deleting an
Actionvia aHotkeythat no longer exists or is not selected - Fix potential crash when loading
7TVchannel emotes, and there is no image URL - Tweaks to
Twitch EventSub Connection/Disconnection - Fix an issue when entering your
Pally.gg URL - Fix
StreamElements UIdisabling wrong Forget button - Fix potential crash in the
YouTubeclient when aMonitored Broadcastis deleted - Fix potential crash when trying to update a
YouTube Broadcastthat no longer exists - Fix deleted
YouTube Broadcaststhat areMonitorednot being correctly removed in the UI - Fix
YouTube Broadcast UI, setting button states, and deselecting deleted Broadcasts if they are selected - Fix wording for
Streamlabs Desktop Settings Add/Editdialog - Fix some
Application Eventshaving incorrect friendly names - Fix
Trovo Present Viewer Tick,Live Datais not a supported option, so it behaves likeYouTubenow - Fix potential crash in
OBS UIwhen usingForced Connectionoption, UI was not overridingDefault/Forcedwhen retrieving info - Fix
C# Method,TwitchGetRewardUserCountersnot having the user's count - Fix loading of
Twitch VIPusers on connection for non-affiliate users - Fix potential internal crash when
WebSocket Serverauthentication fails - Fix
Kofi Donationevent not passing amount as a parameter for theTriggercriteria - Fix validation logic in the
Custom WebSocket Clientdialog - Fix potential crash when attempting to login to
YouTube, but the ports used for auth are in use - Fix logic for
Global (Set) Decrement, was not setting initial value correctly if variable did not exist - Fix delete shortcut key showing the confirmation dialog for
Midi In DevicesandMidi Out Deviceswhen the device is open - Fix
Midi Devicedeletion dialog not showing the device name - Fix validation handling for
Midi In DeviceandMidi Out Devicedialogs - Fix validation handling for
Midi Event Settingsdialog - Fix
Midi Message Triggertriggering if theMidi Eventassociated with it has been deleted - Fix disconnecting
YouTubenot shutting down properly, preventing monitoring from starting again when connecting - Fix an issue when connecting/disconnecting
Twitch Broadcasteraccount that was not cleaning up after itself properly - Fix delete key shortcut for Voice Control Commands not working properly
- Fix
Streamlabs DesktopRecording Startedevent not firing - Fix
Streamlabs Desktop Streamingsub-action not working correctly - Fix
Streamlabs Desktop Recordingsub-action not working correctly
Details
Most of the fixes/changes going into this release can be considered a hot fix release, which is why it is going straight into beta
YouTube
With 0.2.4 and the Multi Broadcast support feature, you can now monitor any type of broadcast, so you can do testing while not live. Monitoring a broadcast that is not live consumes the same amount of quota as a broadcast that is live, and there are no mechanisms in place to stop monitoring a non-live broadcast.
Starting with 0.2.5, in order to help limit quota usage, any non-live broadcast if monitored, will be un-monitored after 10 minutes. If you still need to do testing, etc, you can always monitor the broadcast again.
This is mostly in place for those that might monitor a broadcast, and forget to monitor it, and it runs for hours.
Meld Studio
I couldn't wait till TwitchCon any longer, so, for those that have been asking for it, it's finally here. Meld Studio integration!
A very important note, Meld Studio is still a work in progress application, as such, so is the integration for it. It is something that will evolve over time as more and more features are added and exposed for 3rd party tools to take advantage of.
There are 10 new sub-actions:
- Get Current Scene
- Show Scene
- Get Status
- Recording
- Streaming
- Take Screenshot
- Set Layer Visibility State
- Set Effect Enabled State
- Set Layer Track Muted State
- Set Track Muted State There are also 8 new triggers:
- Connected
- Disconnected
- Recording Started
- Recording Stopped
- Streaming Started
- Streaming Stopped
- Scene Changed
- Event
C# Methods
A connection index of -1 is the fall back to Default
int MeldStudioGetConnectionByName(string name);
bool MeldStudioIsConnected(int connectionIdx = -1);
bool MeldStudioConnect(int connectionIdx = -1);
void MeldStudioDisconnect(int connectionIdx = -1);
bool MeldStudioShowScene(string sceneId, int connectionIdx = -1);
bool MeldStudioShowSceneByName(string sceneName, int connectionIdx = -1);
bool MeldStudioShowLayerByName(string sceneName, string layerName, int connectionIdx = -1);
bool MeldStudioHideLayerByName(string sceneName, string layerName, int connectionIdx = -1);
Streamer.bot Chat
This release brings a new WebSocket server mode to Streamer.bot Chat, allowing it to function in any web browser environment.
Yes!, this includes OBS custom browser docks, and even remote mobile devices for those of you savvy enough to setup tunnelling to your Streamer.bot WebSocket Server 😉
Limitations
- Much work has been done to reduce the limitations of chat when using the
WebSocket Servermode. However, you will notice that many direct moderation actions are disabled inWebSocketmode. You can still work around this with your own quick actions. - Configuration settings are separate from the main chat application. Though this may be more of a feature than a limitation depending on the user 😄
- You can now sync settings from the main Streamer.bot chat window to
WebSocketwindows inSettings->General
There will be bugs
Some things are very much still a work in progress, and some event payloads are still being updated to catch up with recent Streamer.bot application changes.
Streamer.bot Configuration
- The Streamer.bot WebSocket Server must be enabled
- To send chat messages, you must also enable authentication
Elgato WaveLink
Thanks to some of the error reports, I was able to spot some unusual data coming from Elgato WaveLink when making certain calls, this is now hopefully being handled.
Folder Watcher
The new option, Add Changed Data, which defaults to true, will add changed data within the File Watcher Changed event. If you do not need the changed data in this event, or you know for a fact that the files are binary, it is highly recommended to uncheck this option.
Pending Action Cache
A restart is REQUIRED after enabling or disabling this labs feature, and by default, it is disabled.
This labs feature will, on close, write to a database any outstanding pending actions. Pending actions are actions that have not yet run, and are waiting to run, either because they're in a blocking queue, or a queue that is paused.
When Streamer.bot is started, if this cache file is present, it will auto load in any actions that have been cached, as well, it will pause the queue that they belong to. In addition, an argument will be added, wasCached, this will be set to true; during normal operation, this variable will not exist.
This feature is very experimental, and I need feedback on it, for options, capabilities, etc.
A caveat to note, due to the nature of serializing/deserializing, not all data types will preserved. Ones that I am aware of are List<T> objects, these will become object[] arrays when loaded.
NOTE
Consider this feature experimental, and hopefully will evolve over time. Keep in mind, being a lab feature, does not guarantee it will get added as full fledged feature.
YouTube
During some testing, I noticed the Poll closed event was actually coming through in the data, so this is wired up.
Twitch
Added 2 new sub-actions with this release, Get Active Poll, and Get Active Prediction. Both of these sub-actions will add an argument active that is either true or false. If this is false, then there is currently no running poll or prediction. If it is true, then the data for the poll or prediction will be added to the arguments, in the same format as the triggers.
There is a new sub-action, Twitch Create Prediction. Yes, that means you can finally use the UI to create a prediction instead of relying on C# code to do this. Much like the Twitch Create Poll sub-action, all fields support variables and methods, this includes the outcomes.
Gift Bombs and Gift Subs
For a while, the Gift Sub and Gift Bomb events have been giving users intermittent troubles, and after looking more in-depth at some verbose logs, I think I was finally able to solve most, if not all the issues with these events. Hopefully moving forward, these events are a bit more reliable.
Just to re-iterate how and when these events fire:
- A
userin your chat directly gifts another user in your chat a sub, this will trigger aTwitch Gift Subevent - A
userin your chat gifts 1 random sub, this will trigger aTwitch Gift Subevent - A
userin your chat gifts 2 or more subs, this will trigger aTwitch Gift Bombevent, and ifIgnore Gift Subs from Bombsis not enabled, it will also trigger aTwitch Gift Subfor every gifted sub.
Some new variables have been added to the Gift Sub and Gift Bomb event.
random- Whether or not this was a targetedGift sub, this will only be true for single gift subs that were directly given to a user.systemMessage- The system message that was put into Twitch Chat.totalSubsGiftedShared- A boolean value if the user gifting the sub(s) shares there total gift count.randomis only available in the TwitchGift Subevent, while the rest are available in both events
Send Message, Reply to Message and Twitch Announce
Send Message, Reply To Message, Twitch Announce sub-actions received a small update. Prior to 0.2.5, you needed to specify a preferred account to use, either the Broadcaster, or the Bot. If the preferred account was the Bot account, and it was not connected, it would fallback to the Broadcaster account.
These 2 sub-actions have done away with the preferred account, and have 2 new options, Send using Bot account, and Fallback to Broadcaster. How these options work is outlined below:
- If
Send using Bot accountis checked, andFallback to Broadcasteris checked, this is the same behaviour as if you had Bot as your preferred account - If
Send using Bot accountis checked, andFallback to Broadcasteris not checked, it will try to send using only theBotaccount, and do nothing if it can't (i.e, not logged in) - If
Send using Bot accountis not checked, then it will send using theBroadcasteraccount
A configuration upgrade is also in place, it will convert any Twitch Send Message/Twitch Reply To sub-actions to the new format, and if Bot was the preferred account, then both new settings will be checked
Shared Chat
Twitch recently released the Shared Chat feature/capability, and support for it is being added to 0.2.5.
With beta.12, support for the new source tags has been added to Twitch Chat Message events. And at the moment, this data is only exposed to Chat Message and Cheer triggers. Commands, pyramids and first words are still being worked on, and should be available for use in a shared chat in a future beta version.
Payloads for various existing Twitch EventSub events have been updated to handle the new Shared Chat data, but at the moment, this data is not exposed yet, as there are quite a few events to work through and figure out.
Finally, the 3 new events for Shared Chat, Begin, Update and End, have been added as new Triggers
Commands received a new source, Twitch Shared Chat, this will allow you to handle commands from other chats within a Shared Chat Session
13 new events/triggers were added, that hopefully will be working with Twitch's new Shared Chat feature.
New Shared Chat Triggers
- Shared Chat Announcement
- Shared Chat Pay It Forward
- Shared Chat Prime Paid Upgrade
- Shared Chat Gift Paid Upgrade
- Shared Chat Sub
- Shared Chat Resub
- Shared Chat Sub Gift
- Shared Chat Gift Bomb (Community Sub Gift)
- Shared Chat Ban
- Shared Chat Unban
- Shared Chat Timeout
- Shared Chat Untimeout
- Shared Chat Message Deleted
Predictions
To round out the Prediction sub-actions, there are 4 new sub-actions that can be used to interact with the current active prediction.
- Cancel Active prediction
- Lock Active prediction
- Resolve Active Prediction
- Resolve Active Prediction by Title
C# Methods
The C# methods have also been updated. The only thing that has changed, is a new optional parameter fallback to introduce the same behaviour in the sub-action
The new signatures for them are
void SendMessage(string message, bool useBot = true, bool fallback = true);
void TwitchReplyToMessage(string message, string replyId, bool useBot = true, bool fallback = true);
void SendAction(string action, bool useBot = true, bool fallback = true);
Twitch Shield Mode Methods
bool TwitchShieldModeOn();
bool TwitchShieldModeOff();
These changes will be transparent, and will only need updating if you wish to change the behavior
Reward Redemptions
Reward Redemption events have had 5 variables added to them, they are:
skipsQueue- Whether or not the Reward is auto completed when redeemedrequiresUserInput- Whether or not the Reward requires user inputmaxPerStream- How many redemptions can be done per stream, 0 is disabledmaxPerUserPerStream- How many redemptions a user can make during a stream, 0 is disabledglobalCooldown- The global cooldown of the Reward in seconds
Groups
Groups got a bit of an update, there are now events, and triggers associated with them.
New Triggers
- Group Added
- Group Removed
- Group Cleared
- Group Users Added
- Group Users Removed
Streamlabs Website
This is a breaking change, since Streamlabs is making it harder for new users to retrieve their API token, I've finally switched it over to an OAuth type Authentication.
The UI for Streamlabs has been updated with the common login and client connections.
If you are using the Streamlabs integration, be sure to login after starting 0.2.5 to continue receiving events
Streamlabs Desktop
The Streamlabs Desktop integration has been updated to support Horizontal and Vertical sources. In order to better handle these sources and just overall tracking, an internal session is kept of your Streamlabs, and almost all events are handled to keep it updated in real time.
Unfortunately, Groups are completely broken in Streamlabs Desktop. They do not emit any data changes, nor do they have unique enough IDs to be able to figure out which belongs to Horizontal or Vertical. Also, there is no way via WebSocket to enable/disable, or perform any sort of actions or transforms on them. TLDR; use nested Scenes for better control.
The following C# Methods have been updated.
bool SlobsIsSourceVisible(string scene, string source, StreamlabsDesktopOutputType output = StreamlabsDesktopOutputType.Both, int connection = 0);
void SlobsSetSourceVisibility(string scene, string source, bool visible, StreamlabsDesktopOutputType output = StreamlabsDesktopOutputType.Both, int connection = 0);
void SlobsSetSourceVisibilityState(string scene, string source, int state, StreamlabsDesktopOutputType output = StreamlabsDesktopOutputType.Both, int connection = 0);
void SlobsShowSource(string scene, string source, StreamlabsDesktopOutputType output = StreamlabsDesktopOutputType.Both, int connection = 0);
void SlobsHideSource(string scene, string source, StreamlabsDesktopOutputType output = StreamlabsDesktopOutputType.Both, int connection = 0);
void SlobsHideGroupsSources(string scene, string groupName, StreamlabsDesktopOutputType output = StreamlabsDesktopOutputType.Both, int connection = 0);
string SlobsSetRandomGroupSourceVisible(string scene, string groupName, StreamlabsDesktopOutputType output = StreamlabsDesktopOutputType.Both, int connection = 0);
The StreamlabsDesktopOutputType enum
public enum StreamlabsDesktopOutputType
{
Both = 0,
Horizontal = 1,
Vertical = 2
}
New C# Methods
There is a new overload method for TriggerCodeEvent
void TriggerCodeEvent(string eventName, string json);
This method accepts a json string, that Streamer.bot will parse itself. The reason for this, is because of the way the C# code is handled and kept separate, you can not use your own object types within a Dictionary that you pass to the other methods of this, or use JObject, JArray types
New C# Method for Getting a list of commands
List<CommandData> GetCommands();
CommandData class
public class CommandData
{
`public Guid Id { get; set; }
public string Name { get; set; }
public bool Enabled { get; set; }
public string Group { get; set; }
public int Mode { get; set; }
public List<string> Commands { get; set; }
public string RegexCommand { get; set; }
public bool CaseSensitive { get; set; }
public List<string> Sources { get; set; }
`}
Custom Event Trigger Sub-action
This new trigger allows you to Trigger a Custom Event from within a sub-action. Previously you had to use the C# method, TriggerEvent(string eventName, bool useArgs = true). This will allow you to trigger any Custom Event triggers that are created.
mtion Studio
Time for a new feature, with 0.2.5 we're introducing a basic integration for mtion studio.
There are 2 new sub-actions that can be used
- Get Active Clubhouse
- Send Trigger This integration is a bit different, as there is no service to connect to, if you wish to use it, just add either of these sub-actions
OBS
There was a bug that popped up in the beta series for 0.2.5 after making a serialization change to how Streamer.bot handles it's events internally. I was finally able to track this down to the OBS series of events, and because of this, I have changed the data structure for these events.
This data structure is mainly used for Streamer.bot's Websocket, so if you subscribe to any OBS events, they will be a bit different.
This is what the base JS data will be for any OBS Event, some will have additional information.
{
"timeStamp": "2024-09-09T19:43:35.1226962-04:00",
"event": {
"source": "Obs",
"type": "<event here>"
},
"data": {
"connection": {
"id": "edaf6e6e-5040-487e-8ac2-0d5720610e14",
"host": "<host>",
"name": "<name>",
"version": "<version>",
"websocketVersion": "<version>"
}
}
}
If you were relying on any OBS events from Streamer.bot's Websocket, take note, the data has changed, and this is a breaking change.
WebSocket
With the release of 0.2.5 the payload for a Twitch Chat Message, and Cheer are changing. The Message property will stay for backwards compatibility, but is now deprecated, and will be removed in a future version, please update and code to use the new payload data.
The new payload format is still being tweaked, and should be finalized by the time 0.2.5 hits stable, so if you are using these 2 events, feedback is welcome.
Added a handful of new WebSocket requests, these will allow you to get Global Variables, as well as User Variables.
- GetGlobals
- GetGlobal
- TwitchGetUserGlobals
- TwitchGetUserGlobal
- YouTubeGetUserGlobals
- YouTubeGetUserGlobal
- TrovoGetUserGlobals
- TrovoGetUserGlobal
Authentication
With 0.2.5, the WebSocket Server has a new Authentication option, this uses the same authentication method that OBS WebSocket uses.
When connecting to Streamer.bot's WebSocket, you will receive a hello msg, regardless if authentication is enabled or not, this new packet, will contain an info object, that contains the same information from a GetInfo request.
If authentication is enabled, there will be an authentication object that contains a salt and a challenge string. You will use these 2 values, as well as the password to create an Authenticate request.
{
"id": "<some_id_string>",
"request": "Authenticate",
"authentication": "<authentication_string>"
}
You will need to send the above request back to Streamer.bot in order to authenticate. To build the authentication string, you will need to do the following:
- Concatenate the WebSocket password with the salt provided by the server (password + salt)
- Generate an SHA256 binary hash of the result and base64 encode it.
- Concatenate the base64 secret with the challenge sent by the server (base64_secret + challenge)
- Generate a binary SHA256 hash of that result and base64 encode it.
- The resulting string is what you will use for authentication. The docs will be updated to describe these steps in more/better detail.
Also note, there is a new option, Enforce for All Requests, when this is enabled, the WebSocket is expecting an Authenticate request as your first message, if any other request is performed, the socket will be closed. There is also a 30s timeout, where it expects this request to be sent before automatically closing the socket.
The Streamer.bot Client is updated to support this new authentication method.
MIDI
The validation checks performed in the Midi Event Settings dialog have been fixed, which means you can only specify a channel from 1 to 16 if Ignore Channel is not checked, and data value of 1 to 255 if Ignore Data is not checked
Code Signing
It's coming up on a year since obtaining a Code Signing certificate, and I have renewed the certificate today. So moving forward, any new releases, will be using the new certificate.
What this means for older releases once the certificate expires, nothing, as they are properly timestamped, they will continue to function as normal.