mirror of
https://github.com/nuttylmao/nutty.gg.git
synced 2026-09-19 04:00:59 -04:00
Fixed bug for TikTokGift where it showed every gift. It now only shows when the streak has ended.
This commit is contained in:
@@ -1369,6 +1369,15 @@ async function TikTokGift(data) {
|
|||||||
if (!showTikTokGifts)
|
if (!showTikTokGifts)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (data.giftType === 1 && !data.repeatEnd) {
|
||||||
|
// Streak in progress => show only temporary
|
||||||
|
console.debug(`${data.uniqueId} is sending gift ${data.giftName} x${data.repeatCount}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Streak ended or non-streakable gift => process the gift with final repeat_count
|
||||||
|
console.debug(`${data.uniqueId} has sent gift ${data.giftName} x${data.repeatCount}`);
|
||||||
|
|
||||||
// Set the text
|
// Set the text
|
||||||
const username = data.nickname;
|
const username = data.nickname;
|
||||||
const tiktokIcon = `<img src="icons/platforms/tiktok.png" class="platform"/>`;
|
const tiktokIcon = `<img src="icons/platforms/tiktok.png" class="platform"/>`;
|
||||||
|
|||||||
Reference in New Issue
Block a user