From 29ce2fa242e48d413c9cb40659e5c6925fd2622f Mon Sep 17 00:00:00 2001 From: nuttylmao Date: Mon, 14 Jul 2025 09:51:02 +1000 Subject: [PATCH] Changed gifted sub message for Kick --- horizontal-chat/script.js | 72 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 68 insertions(+), 4 deletions(-) diff --git a/horizontal-chat/script.js b/horizontal-chat/script.js index 387c2e0..f54cf56 100644 --- a/horizontal-chat/script.js +++ b/horizontal-chat/script.js @@ -1324,7 +1324,12 @@ function KickGiftedSubscriptions(data) { const gifter = data.gifter_username; const giftedUsers = data.gifted_usernames; - let message = `${gifter} gifted ${giftedUsers.length} subscription${giftedUsers.length === 1 ? '' : 's'} to the community!` + let message = ''; + + if (giftedUsers.length <= 1) + message = `${gifter} gifted a sub to ${giftedUsers[0]}`; + else + message = `${gifter} gifted ${giftedUsers.length} subscription${giftedUsers.length === 1 ? '' : 's'} to the community!`; ShowAlert(message, 'kick'); } @@ -1353,8 +1358,7 @@ function KickStreamHost(data) { function KickMessageDeleted(data) { const messageList = document.getElementById("messageList"); - - // Maintain a list of chat messages to delete +// Maintain a list of chat messages to delete const messagesToRemove = []; // ID of the message to remove @@ -1887,4 +1891,64 @@ function SetConnectionStatus(connected) { statusContainer.style.transition = ""; statusContainer.style.opacity = 1; } -} \ No newline at end of file +} + +let data = { + "chatroom_id": 137726, + "gifted_usernames": [ + "bmblnds", + "akilynczz", + "kukuda", + "him12345", + "mrzexter", + "kelsysosa", + "daddon001", + "Micca", + "SUPAHH0TT", + "andyp85", + "kearaunii", + "brianplayslive", + "Kidrin", + "fasenk", + "mohammadadilibi", + "coolsharkman09", + "PI0_JOGADOR", + "ricviera", + "kiitss", + "Gooboobananas", + "chrisVER455", + "wearyDingo49", + "PelaGOD", + "AksiOnPc", + "Demis898_", + "Koruptid", + "Kyuss", + "SellaRotalis", + "BUZZINJAE", + "carspeedman6", + "ketsuki31", + "Blizzard4E", + "PicklePickleton", + "Narcol", + "kinadol", + "PRAKNASTY", + "Kriegs_Toddlich", + "alz_abod", + "OfficialCoffeeClub", + "cathesaurus", + "Donglong", + "KingGrispy", + "sanwio", + "jakethedog69", + "happyX0", + "Crazedfate011", + "MikkaBot", + "NoLmtJ", + "chipo5000", + "crysstaline" + ], + "gifter_username": "Kick", + "gifter_total": 100 +} + +KickGiftedSubscriptions(data); \ No newline at end of file