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:
@@ -62,6 +62,7 @@ const showKickGifts = GetBooleanParam("showKickGifts", true);
|
||||
const showYouTubeMessages = GetBooleanParam("showYouTubeMessages", true);
|
||||
const showYouTubeSuperChats = GetBooleanParam("showYouTubeSuperChats", true);
|
||||
const showYouTubeSuperStickers = GetBooleanParam("showYouTubeSuperStickers", true);
|
||||
const showYouTubeJewelsGifted = GetBooleanParam("showYouTubeJewelsGifted", true);
|
||||
const showYouTubeSubscribers = GetBooleanParam("showYouTubeSubscribers", false);
|
||||
const showYouTubeMemberships = GetBooleanParam("showYouTubeMemberships", true);
|
||||
|
||||
@@ -236,6 +237,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);
|
||||
@@ -1049,6 +1055,15 @@ function YouTubeSuperSticker(data) {
|
||||
ShowAlert(message, 'youtube');
|
||||
}
|
||||
|
||||
function YouTubeJewelsGifted(data) {
|
||||
if (!showYouTubeJewelsGifted)
|
||||
return;
|
||||
|
||||
let message = `${data.user.name} gifted ${data.jewelsAmount} Jewels`;
|
||||
|
||||
ShowAlert(message, 'youtube');
|
||||
}
|
||||
|
||||
function YouTubeNewSubscriber(data) {
|
||||
if (!showYouTubeSubscribers)
|
||||
return;
|
||||
|
||||
@@ -250,6 +250,14 @@
|
||||
"defaultValue": true,
|
||||
"group": "Which YouTube messages do you want to see?"
|
||||
},
|
||||
{
|
||||
"id": "showYouTubeJewelsGifted",
|
||||
"label": "Jewels Gifted",
|
||||
"description": "",
|
||||
"type": "checkbox",
|
||||
"defaultValue": true,
|
||||
"group": "Which YouTube messages do you want to see?"
|
||||
},
|
||||
{
|
||||
"id": "showYouTubeSubscribers",
|
||||
"label": "New Subscribers",
|
||||
|
||||
Reference in New Issue
Block a user