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
+24
View File
@@ -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;
+17
View File
@@ -380,6 +380,23 @@
"showIf": "showYouTubeSuperStickers",
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "showYouTubeJewelsGifted",
"label": "Jewels Gifted",
"description": "",
"type": "checkbox",
"defaultValue": true,
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "youtubeJewelsGiftedAction",
"label": "",
"description": "Also run this Streamer.bot Action",
"type": "sb-actions",
"defaultValue": "",
"showIf": "showYouTubeJewelsGifted",
"group": "Which YouTube alerts do you want to see?"
},
{
"id": "showYouTubeSubscribers",
"label": "New Subscribers",