ignore same logs
This commit is contained in:
2 files changed
+2
-1
No files matched your search
@@ -140,6 +140,7 @@ class DayzArmbands extends Client {
|
|||||||
|
|
||||||
for (let i = logIndex + 1; i < lines.length; i++) {
|
for (let i = logIndex + 1; i < lines.length; i++) {
|
||||||
if (lines[i].includes("Unknown")) continue;
|
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('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 (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]);
|
if (!(i + 1 >= lines.length) && lines[i + 1].includes('killed by Player')) s = await HandleKillfeed(this, guildId, s, lines[i]);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ module.exports = {
|
|||||||
if (!killedByPlayer) {
|
if (!killedByPlayer) {
|
||||||
const killEvent = new EmbedBuilder()
|
const killEvent = new EmbedBuilder()
|
||||||
.setColor(client.config.Colors.Default)
|
.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] });
|
if (client.exists(channel)) await channel.send({ embeds: [killEvent] });
|
||||||
return stats;
|
return stats;
|
||||||
|
|||||||
Reference in new issue
Block a user