mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Added YouTube Jewels Gifted events
This commit is contained in:
@@ -89,6 +89,8 @@ const showYouTubeSuperChats = GetBooleanParam("showYouTubeSuperChats", true);
|
||||
const youtubeSuperChatAction = urlParams.get("youtubeSuperChatAction") || "";
|
||||
const showYouTubeSuperStickers = GetBooleanParam("showYouTubeSuperStickers", true);
|
||||
const youtubeSuperStickerAction = urlParams.get("youtubeSuperStickerAction") || "";
|
||||
const showYouTubeJewelsGifted = GetBooleanParam("showYouTubeJewelsGifted", true);
|
||||
const youtubeJewelsGiftedAction = urlParams.get("youtubeJewelsGiftedAction") || "";
|
||||
const showYouTubeSubscribers = GetBooleanParam("showYouTubeSubscribers", false);
|
||||
const youtubeSubscriberAction = urlParams.get("youtubeSubscriberAction") || "";
|
||||
const showYouTubeMemberships = GetBooleanParam("showYouTubeMemberships", true);
|
||||
@@ -249,6 +251,11 @@ client.on('YouTube.SuperSticker', (response) => {
|
||||
YouTubeSuperSticker(response.data);
|
||||
})
|
||||
|
||||
client.on('YouTube.JewelsGifted', (response) => {
|
||||
console.debug(response.data);
|
||||
YouTubeJewelsGifted(response.data);
|
||||
})
|
||||
|
||||
client.on('YouTube.NewSubscriber', (response) => {
|
||||
console.debug(response.data);
|
||||
YouTubeNewSubscriber(response.data);
|
||||
@@ -834,6 +841,23 @@ function YouTubeSuperSticker(data) {
|
||||
);
|
||||
}
|
||||
|
||||
function YouTubeJewelsGifted(data) {
|
||||
if (!showYouTubeJewelsGifted)
|
||||
return;
|
||||
|
||||
UpdateAlertBox(
|
||||
'youtube',
|
||||
data.url,
|
||||
`${data.user.name}`,
|
||||
`gifted ${data.jewelsAmount} Jewels`,
|
||||
'',
|
||||
data.user.name,
|
||||
'',
|
||||
youtubeJewelsGiftedAction,
|
||||
data
|
||||
);
|
||||
}
|
||||
|
||||
function YouTubeNewSubscriber(data) {
|
||||
if (!showYouTubeSubscribers)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user