mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Fixed Twitch Watch Streaks showing incorrectly
This commit is contained in:
@@ -1236,7 +1236,7 @@ async function TwitchWatchStreak(data) {
|
|||||||
|
|
||||||
if (showAvatar) {
|
if (showAvatar) {
|
||||||
// Render avatars
|
// Render avatars
|
||||||
const username = data.userName;
|
const username = data.user.login;
|
||||||
const avatarURL = await GetAvatar(username, 'twitch');
|
const avatarURL = await GetAvatar(username, 'twitch');
|
||||||
const avatar = new Image();
|
const avatar = new Image();
|
||||||
avatar.src = avatarURL;
|
avatar.src = avatarURL;
|
||||||
@@ -1250,7 +1250,7 @@ async function TwitchWatchStreak(data) {
|
|||||||
const message = RenderMessageWithEmotesHTML(data.message, data.emotes);
|
const message = RenderMessageWithEmotesHTML(data.message, data.emotes);
|
||||||
|
|
||||||
titleDiv.innerText = `${displayName} is currently on a ${watchStreak} stream streak! `;
|
titleDiv.innerText = `${displayName} is currently on a ${watchStreak} stream streak! `;
|
||||||
contentDiv.innerHTML = message;
|
contentDiv.innerHTML = ConstructMessageFromParts(data.parts);
|
||||||
|
|
||||||
AddMessageItem(instance, data.messageId);
|
AddMessageItem(instance, data.messageId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -725,7 +725,7 @@ async function TwitchWatchStreak(data) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Render avatars
|
// Render avatars
|
||||||
const avatarURL = await GetAvatar(data.userName, 'twitch');
|
const avatarURL = await GetAvatar(data.user.login, 'twitch');
|
||||||
|
|
||||||
// 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
|
||||||
@@ -735,10 +735,10 @@ async function TwitchWatchStreak(data) {
|
|||||||
UpdateAlertBox(
|
UpdateAlertBox(
|
||||||
'twitch',
|
'twitch',
|
||||||
avatarURL,
|
avatarURL,
|
||||||
`${username}`,
|
`${displayName}`,
|
||||||
`is currently on a ${watchStreak} stream streak!`,
|
`is currently on a ${watchStreak} stream streak!`,
|
||||||
'',
|
'',
|
||||||
username,
|
displayName,
|
||||||
'',
|
'',
|
||||||
twitchWatchStreaksAction,
|
twitchWatchStreaksAction,
|
||||||
data
|
data
|
||||||
|
|||||||
Reference in New Issue
Block a user