ignore same logs

This commit is contained in:
SowinskiBraeden committed 2023-05-14 10:01:01 -07:00
1 parent e31a5ba169
commit 253a1c2dc3
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -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]);
+1 -1
View File
@@ -43,7 +43,7 @@ module.exports = {
if (!killedByPlayer) {
const killEvent = new EmbedBuilder()
.setColor(client.config.Colors.Default)
.setDescription(`**Death Event** - <t:${unixTime}>\n**${info.victim}** killed by a **${info.causeOfDeath}.**>`);
.setDescription(`**Death Event** - <t:${unixTime}>\n**${info.victim}** killed by a **${info.causeOfDeath}.**`);
if (client.exists(channel)) await channel.send({ embeds: [killEvent] });
return stats;