From 253a1c2dc38a2f6b68ac235a842063b1399697ca Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sun, 14 May 2023 10:01:01 -0700 Subject: [PATCH] ignore same logs --- structures/DayzArmbands.js | 1 + util/KillfeedHandler.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/structures/DayzArmbands.js b/structures/DayzArmbands.js index e953d86..6a783de 100644 --- a/structures/DayzArmbands.js +++ b/structures/DayzArmbands.js @@ -140,6 +140,7 @@ class DayzArmbands extends Client { for (let i = logIndex + 1; i < lines.length; i++) { if (lines[i].includes("Unknown")) continue; + if ((i - 1) >= 0 && lines[i] == lines[i-1]) continue; if (lines[i].includes('connected') || lines[i].includes('pos=<') || lines[1].includes('hit by Player')) s = await HandlePlayerLogs(this, guildId, s, lines[i]); if (lines[i].includes('killed by with')) s = await HandleKillfeed(this, guildId, s, lines[i]); if (!(i + 1 >= lines.length) && lines[i + 1].includes('killed by Player')) s = await HandleKillfeed(this, guildId, s, lines[i]); diff --git a/util/KillfeedHandler.js b/util/KillfeedHandler.js index 4d76211..51266b7 100644 --- a/util/KillfeedHandler.js +++ b/util/KillfeedHandler.js @@ -43,7 +43,7 @@ module.exports = { if (!killedByPlayer) { const killEvent = new EmbedBuilder() .setColor(client.config.Colors.Default) - .setDescription(`**Death Event** - \n**${info.victim}** killed by a **${info.causeOfDeath}.**>`); + .setDescription(`**Death Event** - \n**${info.victim}** killed by a **${info.causeOfDeath}.**`); if (client.exists(channel)) await channel.send({ embeds: [killEvent] }); return stats;