mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Fixed issue where Mass Gifted subs were showing "0 x Gifted Subs)
This commit is contained in:
@@ -298,6 +298,17 @@ async function CustomEvent(data) {
|
|||||||
break;
|
break;
|
||||||
case ('KickMassGiftSubscription'):
|
case ('KickMassGiftSubscription'):
|
||||||
{
|
{
|
||||||
|
// There is only one sub, so use the same template for a single gifted sub
|
||||||
|
if ('recipient.userName' in data) {
|
||||||
|
avatarEl.src = ConvertWEBPToPNG(data["recipient.profilePicture"]);
|
||||||
|
titleEl.innerText = `Gifted Sub`;
|
||||||
|
|
||||||
|
const messageEl = document.createElement('div');
|
||||||
|
messageEl.innerHTML = `<b>${data["recipient.userName"]}</b><br>received a sub from<br><b>${data.user}</b>!`;
|
||||||
|
|
||||||
|
contentEl.appendChild(messageEl);
|
||||||
|
}
|
||||||
|
else {
|
||||||
avatarEl.src = ConvertWEBPToPNG(await GetAvatar(data.user, 'kick'));
|
avatarEl.src = ConvertWEBPToPNG(await GetAvatar(data.user, 'kick'));
|
||||||
|
|
||||||
// Calculate how many subs were gived
|
// Calculate how many subs were gived
|
||||||
@@ -343,6 +354,7 @@ async function CustomEvent(data) {
|
|||||||
|
|
||||||
contentEl.appendChild(messageEl);
|
contentEl.appendChild(messageEl);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// StreamElements Events
|
// StreamElements Events
|
||||||
|
|||||||
Reference in New Issue
Block a user