Fixed Twitch Watch Streak events

This commit is contained in:
nutty
2026-09-14 12:54:28 +10:00
parent 1a35418602
commit 4945a28df7
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -839,8 +839,8 @@ async function TwitchWatchStreak(data) {
return; return;
// TODO: Streamer.bot v1.0.5-alpha3 changed the data sent with this event, so for backwards compatibility we need to check for both the old and new properties // TODO: Streamer.bot v1.0.5-alpha3 changed the data sent with this event, so for backwards compatibility we need to check for both the old and new properties
const displayName = data.displayName ?? data.user.name; const displayName = data.displayName ?? data.user.name;data.streakCount
const watchStreak = data.watchStreak ?? data.streak_count; const watchStreak = data.watchStreak ?? data.streak_count ?? data.streakCount;
let message = `${displayName} is currently on a ${watchStreak} stream streak!`; let message = `${displayName} is currently on a ${watchStreak} stream streak!`;
+1 -1
View File
@@ -1313,7 +1313,7 @@ async function TwitchWatchStreak(data) {
// TODO: Streamer.bot v1.0.5-alpha3 changed the data sent with this event, so for backwards compatibility we need to check for both the old and new properties // TODO: Streamer.bot v1.0.5-alpha3 changed the data sent with this event, so for backwards compatibility we need to check for both the old and new properties
const displayName = data.displayName ?? data.user.name; const displayName = data.displayName ?? data.user.name;
const watchStreak = data.watchStreak ?? data.streak_count; const watchStreak = data.watchStreak ?? data.streak_count ?? data.streakCount;
titleDiv.innerText = `${displayName} is currently on a ${watchStreak} stream streak! `; titleDiv.innerText = `${displayName} is currently on a ${watchStreak} stream streak! `;
contentDiv.innerHTML = ConstructMessageFromParts(data.parts); contentDiv.innerHTML = ConstructMessageFromParts(data.parts);
+1 -1
View File
@@ -779,7 +779,7 @@ async function TwitchWatchStreak(data) {
// Set the text // Set the text
// TODO: Streamer.bot v1.0.5-alpha3 changed the data sent with this event, so for backwards compatibility we need to check for both the old and new properties // TODO: Streamer.bot v1.0.5-alpha3 changed the data sent with this event, so for backwards compatibility we need to check for both the old and new properties
const displayName = data.displayName ?? data.user.name; const displayName = data.displayName ?? data.user.name;
const watchStreak = data.watchStreak ?? data.streak_count; const watchStreak = data.watchStreak ?? data.streak_count ?? data.streakCount;
UpdateAlertBox( UpdateAlertBox(
'twitch', 'twitch',