mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Added support for Twitch Watch Streaks
This commit is contained in:
@@ -46,6 +46,7 @@ const showTwitchFollows = GetBooleanParam("showTwitchFollows", false);
|
||||
const showTwitchSubs = GetBooleanParam("showTwitchSubs", true);
|
||||
const showTwitchChannelPointRedemptions = GetBooleanParam("showTwitchChannelPointRedemptions", true);
|
||||
const showTwitchRaids = GetBooleanParam("showTwitchRaids", true);
|
||||
const showTwitchWatchStreaks = GetBooleanParam("showTwitchWatchStreaks", true);
|
||||
const showTwitchSharedChat = GetBooleanParam("showTwitchSharedChat", true);
|
||||
|
||||
const kickUsername = urlParams.get("kickUsername") || "";
|
||||
@@ -181,6 +182,11 @@ client.on('Twitch.Raid', (response) => {
|
||||
TwitchRaid(response.data);
|
||||
})
|
||||
|
||||
client.on('Twitch.WatchStreak', (response) => {
|
||||
console.debug(response.data);
|
||||
TwitchWatchStreak(response.data);
|
||||
})
|
||||
|
||||
client.on('Twitch.ChatMessageDeleted', (response) => {
|
||||
console.debug(response.data);
|
||||
TwitchChatMessageDeleted(response.data);
|
||||
@@ -789,6 +795,18 @@ async function TwitchRaid(data) {
|
||||
ShowAlert(message, 'twitch');
|
||||
}
|
||||
|
||||
async function TwitchWatchStreak(data) {
|
||||
if (!showTwitchWatchStreaks)
|
||||
return;
|
||||
|
||||
const displayName = data.displayName;
|
||||
const watchStreak = data.watchStreak;
|
||||
|
||||
let message = `${displayName} is currently on a ${watchStreak}-stream streak!`;
|
||||
|
||||
ShowAlert(message, 'twitch');
|
||||
}
|
||||
|
||||
function TwitchChatMessageDeleted(data) {
|
||||
const messageList = document.getElementById("messageList");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user