Added support for the Twitch ToS strike packet and an alert for it

This commit is contained in:
barelyprofessional
2025-03-25 19:38:44 +08:00
parent 0b1251a49d
commit f644c0f8cc
2 changed files with 16 additions and 0 deletions
+7
View File
@@ -175,6 +175,7 @@ public class BotServices
_twitch = new Twitch([settings[BuiltIn.Keys.TwitchBossmanJackId].ToType<int>()], settings[BuiltIn.Keys.Proxy].Value, _cancellationToken);
_twitch.OnStreamStateUpdated += OnTwitchStreamStateUpdated;
_twitch.OnStreamCommercial += OnTwitchStreamCommercial;
_twitch.OnStreamTosStrike += OnTwitchStreamTosStrike;
await _twitch.StartWsClient();
_logger.Info("Built Twitch Websocket connection for livestream notifications");
}
@@ -637,6 +638,12 @@ public class BotServices
true);
}
private void OnTwitchStreamTosStrike(object sender, int channelId)
{
var username = Helpers.GetValue(BuiltIn.Keys.TwitchBossmanJackUsername).Result;
_chatBot.SendChatMessage($":!::!: {username.Value} was just banned from Twitch! :!::!:", true);
}
private void OnChipsggRecentBet(object sender, ChipsggBetModel bet)
{
var settings = Helpers