From c36a9aef032a38bc2ec390df56436bc62e5278fa Mon Sep 17 00:00:00 2001 From: nuttylmao Date: Thu, 31 Jul 2025 08:05:06 +1000 Subject: [PATCH] Added profile picture support for YouTube --- printer-bot/script.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/printer-bot/script.js b/printer-bot/script.js index 67ae521..b786f3b 100644 --- a/printer-bot/script.js +++ b/printer-bot/script.js @@ -233,8 +233,8 @@ async function CustomEvent(data) { // YouTube Events case ('YouTubeNewSponsor'): { - if (data.profileImageUrl) - avatarEl.src = data.profileImageUrl; + if (data.userProfileUrl) + avatarEl.src = data.userProfileUrl; else avatarEl.style.display = 'none'; @@ -249,8 +249,8 @@ async function CustomEvent(data) { break; case ('YouTubeGiftMembershipReceived'): { - if (data.profileImageUrl) - avatarEl.src = data.profileImageUrl; + if (data.gifterProfileUrl) + avatarEl.src = data.gifterProfileUrl; else avatarEl.style.display = 'none'; titleEl.innerText = `Gifted Membership`; @@ -266,8 +266,8 @@ async function CustomEvent(data) { break; case ('YouTubeSuperChat'): { - if (data.profileImageUrl) - avatarEl.src = data.profileImageUrl; + if (data.userProfileUrl) + avatarEl.src = data.userProfileUrl; else avatarEl.style.display = 'none'; titleEl.style.fontSize = '2em'; @@ -286,9 +286,8 @@ async function CustomEvent(data) { break; case ('YouTubeSuperSticker'): { - // TODO: Need to add image URL of Super Sticker - if (data.profileImageUrl) - avatarEl.src = data.profileImageUrl; + if (data.stickerImageUrl) + avatarEl.src = data.stickerImageUrl; else avatarEl.style.display = 'none'; titleEl.style.fontSize = '2em';