Changelogs

Streamer.bot v0.1.14

Released 2022-10-27

New Features

  • Streamer.bot now has an Auto Updater!
  • Add a new menu item for OBS connections that lets you assign ALL OBS related sub-actions to that connection
  • Add a new OBS Set Color Source Color sub-action and C# methods
  • Request new scope whispers:read on bot account, you will need to re-authorize your bot account
  • Add new CPH method for logging LogVerbose(string logLine)
  • Add new CPH method for LumiaStream LumiaSetToDefault()
  • Add new CPH method for LumiaStream LumiaSendCommand()
  • Add new event for Twitch, Bot Whisper, can now react to whispers the bot account receives
  • Add new command source Twitch Bot Whisper, can now react to whispers the bot account receives
  • Add new CPH method for taking a screen shot in OBS, the source can be either a source, or a scene
  • Add a new sub-action, OBS->Get Status to add OBS status information
  • Add a new sub-action, Twitch->Add Viewer Count to add your current Twitch viewer count as a variable
  • Add new CPH methods for adding/removing moderators/VIPs
  • Add internal method for clearing chat using API call
  • Add new CPH method for clearing chat, bool TwitchClearChatMessages(bool bot = true)
  • Add new CPH method for deleting a chat message, bool TwitchDeleteChatMessage(string messageId, bool bot = true)
  • Add new CPH methods for banning/unbanning and timing out a user
  • Add new CPH method for checking if an action exists, or if its enabled/disabled
  • Support for Twitch Charity, with 2 new events, Donation and Completed
  • Add new sub-action to fetch the latest Twitch Charity Campaign
  • Support for Coin Cheer (this is experimental and could break)
  • Support for Shopify Webhooks!
  • Add new sub-action Discord Basic Webhook, to enable posting basic text to a discord webhook
  • Add new CPH method, DiscordPostTextToWebhook to post text to a discord webhook
  • Add new event for Twitch, Shoutout Created, this is triggered when the /shoutout command is used, if your channel has the ability
  • Added option to enable/disable present viewer tick, default disabled
  • Added option to change present viewer tick from 1 to 10 minutes, default of 5 minutes
  • Added new context menu item for actions to set their queue

Updates

  • New Twitch Scopes requested for both broadcaster and bot accounts
  • Add new C# method, CPH.ObsTakeScreenshot
  • Twitch commands have a new argument, %msgId% which is the id of the message
  • Remove caret from Twitch username text boxes, so there's no indication you should type in them
  • Remove caret from YouTube username text boxes, so there's no indication you should type in them
  • Updates to LumiaSDK, hopefully its a bit more stable and working better
  • Twitch Whisper has been updated to use the new API, this is part of a change away from slash commands being deprecated
  • C# method for sending a whisper on Twitch, has been updated, bool SendWhisper(string userName, string message, bool bot = true)
  • Internally, update various methods to use API calls, instead of IRC commands, as these are being deprecated
  • Update internal methods for adding/removing moderators/VIPs to use API calls
  • Update internal methods for deleting a chat message, to use API call
  • Read Random Line from file sub-action now includes the line number as a variable, %randomLineNumber#%
  • MathParser-mXparser updated to v5.0.7
  • Updated Google YouTube C# Libraries to current
  • Twitch sub-action Set Channel Game, now adds game variables if you've picked a game from the list
  • Streamer.bot's built in websocket server can now listen on any address, just enter * for the ip address
  • Custom websocket servers can now listen on any address, just enter * for the ip address
  • Since Hosts are going away soon on Twitch, they have been removed from Streamer.bot
  • Better handling of Twitch disconnects, this is part of ongoing improvements
  • Timed Action line counts now support YouTube chat, at the moment, line counts work for either service, if you have both connected, line counts will not be used
  • Update endpoint used to get a users current chatters to the new GetChatters API
  • Decrease present viewers tick to 1 minute, with the change to the new GetChatters API
  • Remove LootDevil support, as they closed down
  • Wrap sub-action handling within an action in a try/catch, to catch generic exceptions, this will also halt an action
  • Performance improvements when handling large amounts of viewers
  • Performance improvements when connecting to Twitch
  • Disable verbose logging on Twitch Bot Account
  • Stop saving config when a channel reward is updated
  • Forgetting broadcaster account forgot bot account (woops)
  • Add more verbose logging
  • Changes to the Twitch Present Viewer Tick
  • Updates to File/Folder watch to show error if you try to enable a watcher with a missing folder
  • Move Twitch timeout and ban events to use PubSub events, this provides who, as well as reason in addition to existing data.
  • Updated line count handling for Timed Actions, this is no longer a debounced event, it should happen as the line counts increase. This may change depending how it behaves with performance.
  • Add some checks when using Set Reward Title and Reward Update sub-actions to prevent setting titles longer then 45 characters, and prompt longer then 200 characters

Fixes

  • Typos
  • Blocking state of a queue was not updating visually
  • OBS Take Screenshot sub-action was halting an action when used with OBS websocket v5
  • Lumia Stream Send Command sub-action dialog would crash if there are no commands
  • Lumia Stream disconnect button would not work
  • Lumia Stream Set Color sub-action dialog could possibly crash
  • Catch exceptions thrown by speech recognition initialization, log and try to be more graceful about it
  • Handle potential crash with an internal Users Joined event, when an API call failed
  • Small startup improvements
  • Twitch Add Target Info should have the correct VIP/Subscriber boolean values now
  • Some Twitch API calls weren't being routed through proper internal calls, causing tokens not to be refreshed as needed
  • Some potential crashes in obs-websocket 5 data handling (there may still be more unfortunately)
  • Lumia Stream set color sub-action should correctly pickup manual changes to the color field now
  • Custom Websocket Server would crash when using an invalid address
  • File/Folder watcher was not updating the filter correctly when changed
  • Some logging was not behaving correctly, should behave now
  • Some error may be caught properly now, and longer full crash Streamer.bot
  • DoAction and C# RunAction should now create a new argument dictionary when not running immediately, no longer sharing it
  • CTRL+D shortcut on sub-actions will now duplicate a group correctly
  • VoiceMod Set Background Effect State should work correctly now
  • C# method SetChannelGame should no longer throw an exception when used
  • Comment sub-action should behave correctly now (no longer disappearing, or moving around on its own)
  • Forgetting Twitch broadcaster account forgot bot account (woops)
  • Stop saving config when a channel reward is updated
  • Fix File/Folder watch init to check for existence of folder

Details

Auto Updater

With version 0.1.14, the ground work has been put in to include an auto updater, which means, this is the last version that will require you to manually update. Moving forward, starting with version 0.1.15, you will be able to update within Streamer.bot itself.

If you have been using the recent betas, or are part of alpha testing, you've already been giving this feature a try!

When you launch Streamer.bot it will perform a check to see if there is an update, and if there is, you will see a screen pop-up similar to the one below.

After you click Download, and the update is downloaded, you will be able to install the update by clicking on Install

As you can see, there are update channels, stable, beta, alpha. By default everyone will be on the stable channel, which are the public releases.

To be able to select any other update channel, you will need to have Streamer.bot connected to the website, under Integrations, and have the appropriate roles in the Discord.

New Twitch Broadcaster Scopes

  • channel:read:charity
  • moderator:manage:chat_messages
  • moderator:read:chatters

New Twitch Bot Scopes

  • moderator:manage:chat_messages

Twitch Present Viewer Tick

I have gone through and changed how the present viewer tick operates, it is still possible to have the same behavior as 0.1.12, so continue reading.

The present viewer tick will always happen, but you now have the ability to have it "live update" from twitch, or artificially mark someone as present.

Under the Present Viewer action selector, there are 2 new setttings, a Live Update check box, and a slider bar.

When Live Update is checked, the slider next to it is how often this update will occur, between 1 and 10 minutes, this will also still execute the action at this interval.

When Live Update is not checked, the slider next to it behaves as a threshold. The timer runs every minute, and checks the current time minus the user's last active time, if this is less then the threshold, they are marked as present, otherwise they are marked as not present. The action will still be executed, but, it will occur every minute.

The default setting is Live Update not checked, and the slider set to 5 minutes. To have the same functionality as 0.1.12 and earlier, enable Live Update and make sure the slider is set to 5 minutes.

Twitch Charity

The newly released Charity feature of Twitch is now supported within Streamer.bot

This introduces 2 new events, Donation and Completed

Twitch Timeout and Ban Events

Switching these events to use the data that comes from PubSub, they may happen quicker, as well, more variables are available.

Both the ban and timeout events gain the following variables

NameDescription
createdAtThe date and time the ban or timeout was created
createdByIdThe Twitch ID of the user who created the ban or timeout
createdByUsernameThe user name of the user who created the ban or timeout
createdByDisplayNameThe display name of the user who created the ban or timeout
reasonThe reason for the ban or timeout

Donation Event

The donation event occurs when someone has donated to your charity.

Variable that are included are as follows:

NameDescription
baseAmountThe amount of the donation as a whole number
donationAmountThe amount of the donation in decimal form
charity.nameThe name of the charity you are supporting
currency.codeThe 3 letter ISO currency code
currency.exponentDivide base amount by 10 to the power of this number to get the decimal value

Twitch is providing amount values for Charity calls as whole numbers, so $42.00 will return as 4200.

Completed Event

When donations come through, a check is made if your current donation amount matches what your goal is, and will send a completed event if this is true.

Variable that are included are as follows:

NameDescription
charity.idTwitch's internal ID for your campaign
charity.timestampThe timestamp of the event
charity.currencyThe 3 letter ISO currency code
charity.donationTotalHow much you have raised so far, asa whole number
charity.goalTargetYour campaign's target amount as a whole number

Twitch is providing amount values for Charity calls as whole numbers, so $42.00 will return as 4200.

Twitch Shoutout

Twitch recently added, as a beta feature a new /shoutout command, so for those users who have this on there channel, you can now react to when you, or a moderator uses this command, and treat it like a !so chat command!

The user who was given the shoutout will be contained in the target* variables.

Available variables:

NameDescription
shoutoutIdTwitch's internal ID for the shoutout
targetUserIdThe user's id
targetUserLoginThe user's login name
targetUserDisplayNameThe user's display name
targetUserPrimaryColorHexThe user's primary color in hex
targetUserProfileImageURLThe user's profile image

Shopify

By using the Streamer.bot website, you can now add webhooks to your Shopify store front!

Supported webhook events include Order creation and Order payment {.is-warning}

There are 2 new events within Streamer.bot that you can associate an action with, Order Createdand Order Paid. Both of these events will provide you with almost all the information that is provided by the webhook.

The best way to check the variables, is to setup your webhooks, and assign an empty action, then check the available variables in the Action History tab under Action Queues

New Sub-actions

OBS Set Color Source Color

Added a new sub-action that lets you set the color of a color source within OBS. All fields support %variable% replacement, and there is an option to just set a random color.

OBS Get Status

This will add up to 3 new variables to your action for the selected OBS connection.

NameDescription
isConnectedBoolean value indicating if the selected OBS connection is connected
True/False
isStreamingBoolean value indicating if the selected OBS connection is streaming
True/False
isRecordingBoolean value indicating if the selected OBS connection is recording
True/False

Twitch Add Viewer Count

This will let you add your current Twitch viewer count as a variable to your action.

This value is only updated every 30 seconds

NameDescription
viewerCountYour current Twitch viewer count

Twitch Get Latest Charity Campaign

This sub-action will fetch your latest Twitch Charity campaign and add the information as variables.

NameDescription
campaignIdTwitch's internal ID for your campaign
charity.nameThe name of the charity you are supporting
charity.descriptionThe description of the charity you are supporting
charity.logoUrlThe logo of the charity you are supporting
charity.websiteUrlThe website to the charity you are supporting
currentAmountHow much you have raised so far, asa whole number
targetAmountYour campaign's target amount as a whole number

Twitch is providing amount values for Charity calls as whole numbers, so $42.00 will return as 4200.

Discord Basic Webhook

This is the first of a few new Discord specific sub-actions that will be added. Up first is a friendlier way to post to a webhook you setup in your discord. This one only allows for basic text posting.

Username, content, and image can contain variables and will be parsed.

Username, and image are also optional

New C# Methods

Add the following new C# methods

Logging

void LogVerbose(string logLine);

Twitch

bool SendWhisper(string userName, string message, bool bot = true);
bool TwitchAddModerator(string userName);
bool TwitchRemoveModerator(string userName);
bool TwitchAddVip(string userName);
bool TwitchRemoveVip(string userName);

bool TwitchClearChatMessages(bool bot = true);
bool TwitchDeleteChatMessage(string messageId, bool bot = true);

bool TwitchBanUser(string userName, string reason = null, bool bot = false);
bool TwitchUnbanUser(string userName, bool bot = false);
bool TwitchTimeoutUser(string username, int duration, string reason = null, bool bot = false);

OBS

bool ObsTakeScreenshot(string source, string path, int quality = -1, int connection = 0);
void ObsSetColorSourceColor(string scene, string source, int a, int r, int g, int b, int connection = 0);
void ObsSetColorSourceColor(string scene, string source, string hexColor, int connection = 0);
void ObsSetColorSourceRandomColor(string scene, string source, int connection = 0);

Lumia Stream

void LumiaSendCommand(string command);
void LumiaSetToDefault();

Actions

bool ActionExists(string actionName);

Discord

bool DiscordPostTextToWebhook(string webhookUrl, string content, string username = null, bool textToSpeech = false);

Twitch Whisper

Some important notes with how Twitch Whispers appear to be handled now, this is a copy from the Twitch development documentation.

The user sending the whisper must have a verified phone number (see the Phone Number setting in your Security and Privacy settings).

The API may silently drop whispers that it suspects of violating Twitch policies, it will still indicate success even if the message is dropped.

Rate Limits: You may whisper to a maximum of 40 unique recipients per day. Within the per day limit, you may whisper a maximum of 3 whispers per second and a maximum of 100 whispers per minute.

The maximum message lengths are:

  • 500 characters if the user you're sending the message to hasn't whispered you before.
  • 10,000 characters if the user you're sending the message to has whispered you before.

Messages that exceed the maximum length are truncated.