Update index.js
Browse files
index.js
CHANGED
|
@@ -3,18 +3,16 @@ const axios = require('axios');
|
|
| 3 |
const dns = require('dns');
|
| 4 |
const http = require('http');
|
| 5 |
|
| 6 |
-
// ---
|
| 7 |
const TELEGRAM_TOKEN = process.env.TELEGRAM_TOKEN;
|
| 8 |
const TELEGRAM_CHAT_ID = process.env.TELEGRAM_CHAT_ID;
|
| 9 |
const SESSION_ID = process.env.SESSION_ID;
|
| 10 |
-
const FIXED_COUNTRY = "
|
| 11 |
-
|
| 12 |
-
// Manual accounts list for monitoring
|
| 13 |
-
const ACCOUNTS_TO_WATCH = ['ah_md107', '3z1199'];
|
| 14 |
|
| 15 |
dns.setServers(['8.8.8.8']);
|
| 16 |
|
| 17 |
-
// ---
|
| 18 |
function formatK(num) {
|
| 19 |
if (num >= 1000000) return (num / 1000000).toFixed(1) + 'M';
|
| 20 |
if (num >= 1000) return (num / 1000).toFixed(1) + 'K';
|
|
@@ -22,21 +20,22 @@ function formatK(num) {
|
|
| 22 |
}
|
| 23 |
|
| 24 |
function getBaghdadTime() {
|
| 25 |
-
return new Intl.DateTimeFormat('
|
| 26 |
}
|
| 27 |
|
|
|
|
| 28 |
function formatDuration(totalMinutes) {
|
| 29 |
-
if (totalMinutes < 60) return `${totalMinutes}
|
| 30 |
const hours = Math.floor(totalMinutes / 60);
|
| 31 |
const minutes = totalMinutes % 60;
|
| 32 |
-
return minutes > 0? `${hours}
|
| 33 |
}
|
| 34 |
|
| 35 |
async function sendToTelegram(text, photoUrl = null, targetLink = null) {
|
| 36 |
try {
|
| 37 |
const addrs = await new Promise(r => dns.resolve4('api.telegram.org', (e, a) => r(a)));
|
| 38 |
-
const baseUrl = `https://${addrs}/bot${TELEGRAM_TOKEN}`;
|
| 39 |
-
let formattedText = targetLink? `<a href="${targetLink}">โโโ โ</a>` + text : text;
|
| 40 |
const payload = { chat_id: TELEGRAM_CHAT_ID, parse_mode: 'HTML', disable_web_page_preview: false };
|
| 41 |
|
| 42 |
if (photoUrl) {
|
|
@@ -48,19 +47,19 @@ async function sendToTelegram(text, photoUrl = null, targetLink = null) {
|
|
| 48 |
await axios.post(`${baseUrl}/sendMessage`, payload, { headers: { 'Host': 'api.telegram.org' } });
|
| 49 |
}
|
| 50 |
} catch (e) {
|
| 51 |
-
console.log("
|
| 52 |
}
|
| 53 |
}
|
| 54 |
|
| 55 |
async function startRadar(username) {
|
| 56 |
let user = username.trim();
|
| 57 |
-
const primaryOptions = { processInitialData: true, enableWebsocketUpgrade: true, sessionId: SESSION_ID, clientParams: { "app_language": "
|
| 58 |
-
const fallbackOptions = { processInitialData: true, enableWebsocketUpgrade: true, sessionId: SESSION_ID, clientParams: { "app_language": "
|
| 59 |
|
| 60 |
let connection = new WebcastPushConnection(user, primaryOptions);
|
| 61 |
let highestHundred = 0, maxViewers = 0, totalLikes = 0, totalShares = 0;
|
| 62 |
let giftersMap = {}, commentersMap = {}, adminsSeen = new Set();
|
| 63 |
-
let bestGift = { name: "
|
| 64 |
let startTime = null;
|
| 65 |
let fastCommentCounter = {};
|
| 66 |
let alertedComments = new Set();
|
|
@@ -69,13 +68,13 @@ async function startRadar(username) {
|
|
| 69 |
const state = await connection.connect();
|
| 70 |
handleConnectionSuccess(state);
|
| 71 |
} catch (err) {
|
| 72 |
-
console.log(`
|
| 73 |
connection = new WebcastPushConnection(user, fallbackOptions);
|
| 74 |
try {
|
| 75 |
const state = await connection.connect();
|
| 76 |
handleConnectionSuccess(state);
|
| 77 |
} catch (fallbackErr) {
|
| 78 |
-
console.log(`
|
| 79 |
setTimeout(() => startRadar(user), 60000);
|
| 80 |
return;
|
| 81 |
}
|
|
@@ -83,44 +82,29 @@ async function startRadar(username) {
|
|
| 83 |
|
| 84 |
function handleConnectionSuccess(state) {
|
| 85 |
startTime = new Date();
|
| 86 |
-
let statusEmoji = state.roomInfo.live_room_mode === 4? "๐ค" : "๐ด";
|
| 87 |
-
let statusText = state.roomInfo.live_room_mode === 4? "
|
| 88 |
let liveLink = `https://www.tiktok.com/@${user}/live`;
|
| 89 |
if (state.roomInfo.live_room_mode === 4 && state.roomInfo.owner) {
|
| 90 |
liveLink = `https://www.tiktok.com/@${state.roomInfo.owner.uniqueId}/live`;
|
| 91 |
}
|
| 92 |
-
let msg = `${statusEmoji} <b>${statusText}</b>\n` +
|
| 93 |
-
`โโโโโโโโโโโโโโโโโ\n` +
|
| 94 |
-
`๐ค <b>Account:</b> <code>${user}</code>\n` +
|
| 95 |
-
`๐ <b>Country:</b> ${FIXED_COUNTRY}\n` +
|
| 96 |
-
`๐
<b>Time:</b> <code>${getBaghdadTime()}</code>\n` +
|
| 97 |
-
`โโโโโโโโโโโโโโโโโ\n` +
|
| 98 |
-
`๐ <b>Link:</b> <a href="${liveLink}">${liveLink}</a>`;
|
| 99 |
sendToTelegram(msg);
|
| 100 |
}
|
| 101 |
|
| 102 |
-
|
| 103 |
-
connection.on('like', (data) => { totalLikes = data.totalLikeCount; });
|
| 104 |
connection.on('social', (data) => { if (data.displayType && data.displayType.includes('share')) totalShares++; });
|
| 105 |
|
| 106 |
-
// Handle All Boxes and Interaction Bags
|
| 107 |
const handleBox = (data, type) => {
|
| 108 |
-
let coins = data.coins |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
| data.amount |
|
| 112 |
-
| "N/A";
|
| 113 |
-
let sender = data.nickname |
|
| 114 |
-
|
| 115 |
-
| (data.user && data.user.nickname) |
|
| 116 |
-
| 'Unknown';
|
| 117 |
-
sendToTelegram(`๐ฐ <b>${type} Alert!</b>\n๐ค Live: @${user}\n๐ From: <b>${sender}</b>\n๐ Value: <b>${coins} Coins</b>`);
|
| 118 |
};
|
| 119 |
|
| 120 |
-
connection.on('treasureBox', (data) => handleBox(data, "
|
| 121 |
-
connection.on('luckyBox', (data) => handleBox(data, "
|
| 122 |
-
connection.on('chest', (data) => handleBox(data, "
|
| 123 |
-
connection.on('envelope', (data) => handleBox(data, "
|
| 124 |
|
| 125 |
connection.on('chat', (data) => {
|
| 126 |
let text = data.comment.trim();
|
|
@@ -128,12 +112,12 @@ async function startRadar(username) {
|
|
| 128 |
if (!commentersMap[data.userId]) commentersMap[data.userId] = { name: data.nickname, count: 0 };
|
| 129 |
commentersMap[data.userId].count++;
|
| 130 |
if (text.length > 1) {
|
| 131 |
-
if (!fastCommentCounter[text]) fastCommentCounter[text] =;
|
| 132 |
fastCommentCounter[text].push(now);
|
| 133 |
fastCommentCounter[text] = fastCommentCounter[text].filter(ts => now - ts < 60000);
|
| 134 |
-
if (fastCommentCounter[text].length >= 100 &&!alertedComments.has(text)) {
|
| 135 |
alertedComments.add(text);
|
| 136 |
-
sendToTelegram(`โ ๏ธ <b>
|
| 137 |
setTimeout(() => alertedComments.delete(text), 300000);
|
| 138 |
}
|
| 139 |
}
|
|
@@ -146,20 +130,21 @@ async function startRadar(username) {
|
|
| 146 |
if (currentHundred >= 100 && currentHundred > highestHundred) {
|
| 147 |
highestHundred = currentHundred;
|
| 148 |
let liveLink = `https://www.tiktok.com/@${user}/live`;
|
| 149 |
-
sendToTelegram(`๐ <b>
|
| 150 |
}
|
| 151 |
});
|
| 152 |
|
| 153 |
connection.on('member', (data) => {
|
| 154 |
-
if (data.isModerator &&!adminsSeen.has(data.uniqueId)) {
|
| 155 |
adminsSeen.add(data.uniqueId);
|
| 156 |
-
sendToTelegram(`๐ก๏ธ <b>
|
| 157 |
}
|
| 158 |
-
|
|
|
|
| 159 |
});
|
| 160 |
|
| 161 |
connection.on('gift', (data) => {
|
| 162 |
-
if (data.giftType === 1 &&!data.repeatEnd) return;
|
| 163 |
let giftCost = data.diamondCount * data.repeatCount;
|
| 164 |
if (!giftersMap[data.userId]) giftersMap[data.userId] = { name: data.nickname, coins: 0 };
|
| 165 |
giftersMap[data.userId].coins += giftCost;
|
|
@@ -167,27 +152,26 @@ async function startRadar(username) {
|
|
| 167 |
});
|
| 168 |
|
| 169 |
connection.on('disconnected', () => {
|
| 170 |
-
|
| 171 |
-
const
|
| 172 |
-
const
|
|
|
|
| 173 |
|
| 174 |
let sortedGifters = Object.values(giftersMap).sort((a, b) => b.coins - a.coins).slice(0, 3);
|
| 175 |
let sortedCommenters = Object.values(commentersMap).sort((a, b) => b.count - a.count).slice(0, 5);
|
| 176 |
-
let endMsg = `๐ <b>
|
| 177 |
|
| 178 |
sortedGifters.forEach((g, i) => {
|
| 179 |
-
endMsg += `${i === 0? '๐ฅ' : i === 1? '๐ฅ' : '๐ฅ'} <code>${g.name}</code> : <b>${formatK(g.coins)}</b>\n`;
|
| 180 |
});
|
| 181 |
|
| 182 |
-
endMsg += `\n๐ฌ <b>
|
| 183 |
sortedCommenters.forEach((c, i) => {
|
| 184 |
endMsg += `${i+1}. <code>${c.name}</code> (${c.count})\n`;
|
| 185 |
});
|
| 186 |
|
| 187 |
-
if (bestGift.cost > 0) endMsg += `\n๐ <b>
|
| 188 |
-
sendToTelegram(endMsg, bestGift.icon |
|
| 189 |
-
|
| 190 |
-
| null, `https://www.tiktok.com/@${user}/live`);
|
| 191 |
|
| 192 |
fastCommentCounter = {};
|
| 193 |
alertedComments = new Set();
|
|
|
|
| 3 |
const dns = require('dns');
|
| 4 |
const http = require('http');
|
| 5 |
|
| 6 |
+
// --- ุฅุนุฏุงุฏุงุช ุงููุธุงู
---
|
| 7 |
const TELEGRAM_TOKEN = process.env.TELEGRAM_TOKEN;
|
| 8 |
const TELEGRAM_CHAT_ID = process.env.TELEGRAM_CHAT_ID;
|
| 9 |
const SESSION_ID = process.env.SESSION_ID;
|
| 10 |
+
const FIXED_COUNTRY = "ุงูุนุฑุงู ๐ฎ๐ถ";
|
| 11 |
+
const ACCOUNTS_TO_WATCH = process.env.ACCOUNTS_LIST ? process.env.ACCOUNTS_LIST.split(',') : [];
|
|
|
|
|
|
|
| 12 |
|
| 13 |
dns.setServers(['8.8.8.8']);
|
| 14 |
|
| 15 |
+
// --- ุฏูุงู ุงูุชูุณูู ูุงูููุช ---
|
| 16 |
function formatK(num) {
|
| 17 |
if (num >= 1000000) return (num / 1000000).toFixed(1) + 'M';
|
| 18 |
if (num >= 1000) return (num / 1000).toFixed(1) + 'K';
|
|
|
|
| 20 |
}
|
| 21 |
|
| 22 |
function getBaghdadTime() {
|
| 23 |
+
return new Intl.DateTimeFormat('ar-IQ', { timeZone: 'Asia/Baghdad', dateStyle: 'medium', timeStyle: 'medium', hour12: true }).format(new Date());
|
| 24 |
}
|
| 25 |
|
| 26 |
+
// ุฏุงูุฉ ุชุญููู ุงูุฏูุงุฆู ุฅูู ุณุงุนุงุช ูุฏูุงุฆู
|
| 27 |
function formatDuration(totalMinutes) {
|
| 28 |
+
if (totalMinutes < 60) return `${totalMinutes} ุฏูููุฉ`;
|
| 29 |
const hours = Math.floor(totalMinutes / 60);
|
| 30 |
const minutes = totalMinutes % 60;
|
| 31 |
+
return minutes > 0 ? `${hours} ุณุงุนุฉ ู ${minutes} ุฏูููุฉ` : `${hours} ุณุงุนุฉ`;
|
| 32 |
}
|
| 33 |
|
| 34 |
async function sendToTelegram(text, photoUrl = null, targetLink = null) {
|
| 35 |
try {
|
| 36 |
const addrs = await new Promise(r => dns.resolve4('api.telegram.org', (e, a) => r(a)));
|
| 37 |
+
const baseUrl = `https://${addrs[0]}/bot${TELEGRAM_TOKEN}`;
|
| 38 |
+
let formattedText = targetLink ? `<a href="${targetLink}">โโโ โ</a>` + text : text;
|
| 39 |
const payload = { chat_id: TELEGRAM_CHAT_ID, parse_mode: 'HTML', disable_web_page_preview: false };
|
| 40 |
|
| 41 |
if (photoUrl) {
|
|
|
|
| 47 |
await axios.post(`${baseUrl}/sendMessage`, payload, { headers: { 'Host': 'api.telegram.org' } });
|
| 48 |
}
|
| 49 |
} catch (e) {
|
| 50 |
+
console.log("โ ๏ธ ุฎุทุฃ ุชูุฌุฑุงู
");
|
| 51 |
}
|
| 52 |
}
|
| 53 |
|
| 54 |
async function startRadar(username) {
|
| 55 |
let user = username.trim();
|
| 56 |
+
const primaryOptions = { processInitialData: true, enableWebsocketUpgrade: true, sessionId: SESSION_ID, clientParams: { "app_language": "ar-IQ", "device_platform": "web", "tt_target_idc": "useast1a" } };
|
| 57 |
+
const fallbackOptions = { processInitialData: true, enableWebsocketUpgrade: true, sessionId: SESSION_ID, clientParams: { "app_language": "ar-IQ", "device_platform": "web" } };
|
| 58 |
|
| 59 |
let connection = new WebcastPushConnection(user, primaryOptions);
|
| 60 |
let highestHundred = 0, maxViewers = 0, totalLikes = 0, totalShares = 0;
|
| 61 |
let giftersMap = {}, commentersMap = {}, adminsSeen = new Set();
|
| 62 |
+
let bestGift = { name: "ูุง ููุฌุฏ", cost: 0, sender: "", icon: "" };
|
| 63 |
let startTime = null;
|
| 64 |
let fastCommentCounter = {};
|
| 65 |
let alertedComments = new Set();
|
|
|
|
| 68 |
const state = await connection.connect();
|
| 69 |
handleConnectionSuccess(state);
|
| 70 |
} catch (err) {
|
| 71 |
+
console.log(`โ ๏ธ ูุดู ุงูุงุชุตุงู ุงูุฃุณุงุณู ูู ${user}ุ ู
ุญุงููุฉ ุงูุงุชุตุงู ุงูุงุญุชูุงุทู...`);
|
| 72 |
connection = new WebcastPushConnection(user, fallbackOptions);
|
| 73 |
try {
|
| 74 |
const state = await connection.connect();
|
| 75 |
handleConnectionSuccess(state);
|
| 76 |
} catch (fallbackErr) {
|
| 77 |
+
console.log(`โ ูุดู ุงูุงุชุตุงู ุงูุงุญุชูุงุทู ุฃูุถุงู ูู ${user}`);
|
| 78 |
setTimeout(() => startRadar(user), 60000);
|
| 79 |
return;
|
| 80 |
}
|
|
|
|
| 82 |
|
| 83 |
function handleConnectionSuccess(state) {
|
| 84 |
startTime = new Date();
|
| 85 |
+
let statusEmoji = state.roomInfo.live_room_mode === 4 ? "๐ค" : "๐ด";
|
| 86 |
+
let statusText = state.roomInfo.live_room_mode === 4 ? "ุชูุจูู: ุตุงุนุฏ ุฌูุณุช ุงูุขู!" : "ุงูุทูุงู ุงูุจุซ ุงูู
ุจุงุดุฑ";
|
| 87 |
let liveLink = `https://www.tiktok.com/@${user}/live`;
|
| 88 |
if (state.roomInfo.live_room_mode === 4 && state.roomInfo.owner) {
|
| 89 |
liveLink = `https://www.tiktok.com/@${state.roomInfo.owner.uniqueId}/live`;
|
| 90 |
}
|
| 91 |
+
let msg = `${statusEmoji} <b>${statusText}</b>\n` + `โโโโโโโโโโโโโโโโโ\n` + `๐ค <b>ุงูุญุณุงุจ:</b> <code>${user}</code>\n` + `๐ <b>ุงูุฏููุฉ:</b> ${FIXED_COUNTRY}\n` + `๐
<b>ุงูููุช:</b> <code>${getBaghdadTime()}</code>\n` + `โโโโโโโโโโโโโโโโโ\n` + `๐ <b>ุฑุงุจุท ุงูุจุซ:</b> <a href="${liveLink}">${liveLink}</a>`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
sendToTelegram(msg);
|
| 93 |
}
|
| 94 |
|
| 95 |
+
connection.on('like', (data) => { totalLikes = data.totalLikeCount; });
|
|
|
|
| 96 |
connection.on('social', (data) => { if (data.displayType && data.displayType.includes('share')) totalShares++; });
|
| 97 |
|
|
|
|
| 98 |
const handleBox = (data, type) => {
|
| 99 |
+
let coins = data.coins || data.diamonds || data.amount || "ุบูุฑ ู
ุญุฏุฏ";
|
| 100 |
+
let sender = data.nickname || (data.user && data.user.nickname) || 'ู
ุฌููู';
|
| 101 |
+
sendToTelegram(`๐ฐ <b>ุชูุจูู ${type}!</b>\n๐ค ูู ุจุซ: @${user}\n๐ ู
ู: <b>${sender}</b>\n๐ ุงูููู
ุฉ: <b>${coins} ุนู
ูุฉ</b>`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
};
|
| 103 |
|
| 104 |
+
connection.on('treasureBox', (data) => handleBox(data, "ุญููุจุฉ ุนู
ูุงุช"));
|
| 105 |
+
connection.on('luckyBox', (data) => handleBox(data, "ุตูุฏูู ุญุธ"));
|
| 106 |
+
connection.on('chest', (data) => handleBox(data, "ุญููุจุฉ (ุชูุงุนู)"));
|
| 107 |
+
connection.on('envelope', (data) => handleBox(data, "ู
ุบูู ุนู
ูุงุช"));
|
| 108 |
|
| 109 |
connection.on('chat', (data) => {
|
| 110 |
let text = data.comment.trim();
|
|
|
|
| 112 |
if (!commentersMap[data.userId]) commentersMap[data.userId] = { name: data.nickname, count: 0 };
|
| 113 |
commentersMap[data.userId].count++;
|
| 114 |
if (text.length > 1) {
|
| 115 |
+
if (!fastCommentCounter[text]) fastCommentCounter[text] = [];
|
| 116 |
fastCommentCounter[text].push(now);
|
| 117 |
fastCommentCounter[text] = fastCommentCounter[text].filter(ts => now - ts < 60000);
|
| 118 |
+
if (fastCommentCounter[text].length >= 100 && !alertedComments.has(text)) {
|
| 119 |
alertedComments.add(text);
|
| 120 |
+
sendToTelegram(`โ ๏ธ <b>ุณุจุงู
ุณุฑูุน @${user}!</b>\n๐ฌ "<code>${text}</code>"\n๐ฅ ุชูุฑุฑ 100 ู
ุฑุฉ ูู ุฏูููุฉ!`);
|
| 121 |
setTimeout(() => alertedComments.delete(text), 300000);
|
| 122 |
}
|
| 123 |
}
|
|
|
|
| 130 |
if (currentHundred >= 100 && currentHundred > highestHundred) {
|
| 131 |
highestHundred = currentHundred;
|
| 132 |
let liveLink = `https://www.tiktok.com/@${user}/live`;
|
| 133 |
+
sendToTelegram(`๐ <b>ุฅูุฌุงุฒ @${user}:</b> ูุตู ุงูุขู <code>${formatK(currentHundred)}</code> ู
ุดุงูุฏ!\n๐ <a href="${liveLink}">ุฏุฎูู ุงูุจุซ</a>`);
|
| 134 |
}
|
| 135 |
});
|
| 136 |
|
| 137 |
connection.on('member', (data) => {
|
| 138 |
+
if (data.isModerator && !adminsSeen.has(data.uniqueId)) {
|
| 139 |
adminsSeen.add(data.uniqueId);
|
| 140 |
+
sendToTelegram(`๐ก๏ธ <b>ู
ุดุฑู ุฏุฎู ุจุซ @${user}:</b>\n๐ค <code>@${data.uniqueId}</code>`);
|
| 141 |
}
|
| 142 |
+
// ุงูุชุนุฏูู: ุชุฑุญูุจ VIP ู
ู ููู 30 ูููู
|
| 143 |
+
if (data.userLevel >= 30) sendToTelegram(`๐ <b>ุฏุฎูู VIP (Lvl ${data.userLevel})</b>\n๐ค ุจุซ @${user}: <code>@${data.uniqueId}</code>`);
|
| 144 |
});
|
| 145 |
|
| 146 |
connection.on('gift', (data) => {
|
| 147 |
+
if (data.giftType === 1 && !data.repeatEnd) return;
|
| 148 |
let giftCost = data.diamondCount * data.repeatCount;
|
| 149 |
if (!giftersMap[data.userId]) giftersMap[data.userId] = { name: data.nickname, coins: 0 };
|
| 150 |
giftersMap[data.userId].coins += giftCost;
|
|
|
|
| 152 |
});
|
| 153 |
|
| 154 |
connection.on('disconnected', () => {
|
| 155 |
+
// ุงูุชุนุฏูู: ุญุณุงุจ ุงูู
ุฏู ูุชุญููููุง ูุณุงุนุงุช ุฅุฐุง ุชุฌุงูุฒุช 60 ุฏูููุฉ
|
| 156 |
+
const diffMs = new Date() - startTime;
|
| 157 |
+
const totalMinutes = startTime ? Math.floor(diffMs / 60000) : 0;
|
| 158 |
+
const durationStr = startTime ? formatDuration(totalMinutes) : "ุบูุฑ ู
ุญุฏุฏ";
|
| 159 |
|
| 160 |
let sortedGifters = Object.values(giftersMap).sort((a, b) => b.coins - a.coins).slice(0, 3);
|
| 161 |
let sortedCommenters = Object.values(commentersMap).sort((a, b) => b.count - a.count).slice(0, 5);
|
| 162 |
+
let endMsg = `๐ <b>ู
ูุฎุต ุงูููุงูุฉ (@${user})</b>\nโโโโโโโโโโโโโโโโโ\nโฑ๏ธ <b>ุงูู
ุฏุฉ:</b> ${durationStr} | ๐
<b>ุงูููุช:</b> ${getBaghdadTime()}\n๐ ๐๏ธ ${formatK(maxViewers)} | โค๏ธ ${formatK(totalLikes)} | ๐ ${totalShares}\nโโโโโโโโโโโโโโโโโ\n๐ <b>ุฃูุถู 3 ุฏุงุนู
ูู:</b>\n`;
|
| 163 |
|
| 164 |
sortedGifters.forEach((g, i) => {
|
| 165 |
+
endMsg += `${i === 0 ? '๐ฅ' : i === 1 ? '๐ฅ' : '๐ฅ'} <code>${g.name}</code> : <b>${formatK(g.coins)}</b>\n`;
|
| 166 |
});
|
| 167 |
|
| 168 |
+
endMsg += `\n๐ฌ <b>ุฃูุซุฑ 5 ู
ุนูููู ุชูุงุนูุงู:</b>\n`;
|
| 169 |
sortedCommenters.forEach((c, i) => {
|
| 170 |
endMsg += `${i+1}. <code>${c.name}</code> (${c.count})\n`;
|
| 171 |
});
|
| 172 |
|
| 173 |
+
if (bestGift.cost > 0) endMsg += `\n๐ <b>ุฃููู ูุฏูุฉ:</b> ${bestGift.name} ู
ู <b>${bestGift.sender}</b>`;
|
| 174 |
+
sendToTelegram(endMsg, bestGift.icon || null, `https://www.tiktok.com/@${user}/live`);
|
|
|
|
|
|
|
| 175 |
|
| 176 |
fastCommentCounter = {};
|
| 177 |
alertedComments = new Set();
|