Add files via upload
This commit is contained in:
@@ -838,4 +838,4 @@ function randomString(length) {
|
||||
function randomColor() {
|
||||
const randomColor = "hsl(" + Math.random() * 360 + ", 100%, 75%)";
|
||||
return randomColor;
|
||||
}
|
||||
}
|
@@ -393,7 +393,7 @@ async function kickChatMessageDeleted(data) {
|
||||
|
||||
|
||||
async function kickUserBanned(data) {
|
||||
chatContainer.querySelectorAll(`[data-user="${data.user.slug}"]`).forEach(element => {
|
||||
chatContainer.querySelectorAll(`[data-user="${data.user.slug}"]:not(.event)`).forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
@@ -401,7 +401,7 @@ async function kickUserBanned(data) {
|
||||
|
||||
|
||||
async function kickChatClearMessages() {
|
||||
chatContainer.querySelectorAll(`.kick`).forEach(element => {
|
||||
chatContainer.querySelectorAll(`.kick:not(.event)`).forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
@@ -567,4 +567,4 @@ async function getKickBadges(badges) {
|
||||
});
|
||||
|
||||
return badgesArray.join(' ');
|
||||
}
|
||||
}
|
@@ -32,8 +32,8 @@ streamerBotClient.on('General.Custom', (response) => {
|
||||
break;
|
||||
case 'like' :
|
||||
tiktokUpdateStatistics(jsonData, 'likes');
|
||||
/*console.log('TikTok Likes', jsonData);
|
||||
tiktokLikesMessage(jsonData);*/
|
||||
//console.log('TikTok Likes', jsonData);
|
||||
tiktokLikesMessage(jsonData);
|
||||
break;
|
||||
case 'chat' :
|
||||
console.log('TikTok Chat', jsonData);
|
||||
@@ -148,6 +148,7 @@ async function tiktokLikesMessage(data) {
|
||||
|
||||
if (showTikTokLikes == false) return;
|
||||
|
||||
|
||||
const {
|
||||
userId: userID,
|
||||
msgId: messageID,
|
||||
@@ -183,6 +184,28 @@ async function tiktokLikesMessage(data) {
|
||||
};
|
||||
|
||||
addEventToChat(userID, messageID, 'tiktok', messageData);
|
||||
|
||||
|
||||
|
||||
/*const likedivs = chatContainer.querySelectorAll('div.message.likes');
|
||||
|
||||
if (likedivs.length == 6) {
|
||||
// Mapeia os likedivs com seus respectivos valores de like
|
||||
const likedivsWithCounts = Array.from(likedivs)
|
||||
.map(div => {
|
||||
const likeCountEl = div.querySelector('em.likecount');
|
||||
const count = likeCountEl ? parseInt(likeCountEl.textContent.trim(), 10) : 0;
|
||||
return { div, count };
|
||||
});
|
||||
|
||||
// Ordena do menor para o maior like
|
||||
likedivsWithCounts.sort((a, b) => a.count - b.count);
|
||||
|
||||
// Remove os 3 com menor contagem
|
||||
for (let i = 0; i < 3 && i < likedivsWithCounts.length; i++) {
|
||||
likedivsWithCounts[i].div.remove();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
@@ -512,7 +512,7 @@ async function twitchUserBanned(data) {
|
||||
|
||||
|
||||
async function twitchChatClearMessages() {
|
||||
chatContainer.querySelectorAll(`.twitch`).forEach(element => {
|
||||
chatContainer.querySelectorAll(`.twitch:not(.event)`).forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ async function youTubeChatMessage(data) {
|
||||
|
||||
|
||||
async function youTubeUserBanned(data) {
|
||||
chatContainer.querySelectorAll(`[data-user="${data.bannedUser.id}"]`).forEach(element => {
|
||||
chatContainer.querySelectorAll(`[data-user="${data.bannedUser.id}"]:not(.event)`).forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user