From f83a932ac13e9507336e2df3d4e25a095f2c896a Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sun, 24 Sep 2023 18:50:41 -0700 Subject: [PATCH] fix/queue alarm pings --- package.json | 2 +- structures/DayzRBot.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b6f3ae8..1b32105 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayzr-bot", - "version": "10.1.0", + "version": "10.1.1", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "main": "index.js", "nodemonConfig": { diff --git a/structures/DayzRBot.js b/structures/DayzRBot.js index d14c1b6..80fb05d 100644 --- a/structures/DayzRBot.js +++ b/structures/DayzRBot.js @@ -156,13 +156,13 @@ class DayzRBot extends Client { if (lines[i].includes('killed by Player') && !lines[i - 1].includes('hit by Player')) s = await HandleKillfeed(this, guildId, s, lines[i]); // Handles deaths missing hit by log } - for (const [channel_id, role] of Object.entries(client.alarmPingQueue)) { - const channel = client.GetChannel(channel_id); + for (const [channel_id, role] of Object.entries(this.alarmPingQueue)) { + const channel = this.GetChannel(channel_id); - channel.send({ content: `<@&${role}>`, embeds: client.alarmPingQueue[channel_id][role] }); + channel.send({ content: `<@&${role}>`, embeds: this.alarmPingQueue[channel_id][role] }); } - client.alarmPingQueue = {}; + this.alarmPingQueue = {}; const playerTemplate = /(.*) \| Player \"(.*)\" \(id=(.*) pos=<(.*)>\)/g; let previouslyConnected = s.filter(p => p.connected); // All players with connection log captured above and no disconnect log