Added YouTube Jewels Gifted events

This commit is contained in:
nutty
2026-09-14 13:29:09 +10:00
parent 7c31fc1b57
commit 216e78df30
6 changed files with 114 additions and 1 deletions
+15
View File
@@ -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;
+8
View File
@@ -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",