From 7b6e0441eb4a7bb48ddbbbf3b0954c84736d5edd Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Thu, 8 Jun 2023 09:07:08 -0700 Subject: [PATCH] debug collect income --- commands/collect-income.js | 2 ++ package.json | 2 +- util/AlarmsHandler.js | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/commands/collect-income.js b/commands/collect-income.js index 85990dc..7044c44 100644 --- a/commands/collect-income.js +++ b/commands/collect-income.js @@ -65,6 +65,8 @@ module.exports = { const success = addUser(banking.guilds, GuildDB.serverID, interaction.member.user.id, client, GuildDB.startingBalance); if (!success) return client.sendInternalError(interaction, 'Failed to add bank'); } + + if (!client.exists(banking.guilds[GuildDB.serverID].lastIncome)) banking.guilds[GuildDB.serverID].lastIncome: new Date('2000-01-01T00:00:00'); let now = new Date(); let diff = (now - banking.guilds[GuildDB.serverID].lastIncome) / 1000; diff --git a/package.json b/package.json index 0fd82a5..f84e3b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayz-armbands", - "version": "6.12.2", + "version": "6.12.3", "description": "A General Purpose Discord Bot for DayZ Servers.", "main": "index.js", "nodemonConfig": { diff --git a/util/AlarmsHandler.js b/util/AlarmsHandler.js index 8e80143..b49209a 100644 --- a/util/AlarmsHandler.js +++ b/util/AlarmsHandler.js @@ -102,9 +102,6 @@ module.exports = { if (alarm.disabled || !alarm.rules.includes('ban_on_kill')) continue; // ignore if alarm is disabled or not ban on kill; if (alarm.ignoredPlayers.includes(data.killerID)) continue; - console.log(data); - console.log(alarm); - let diff = [Math.round(alarm.origin[0] - data.killerPOS[0]), Math.round(alarm.origin[1] - data.killerPOS[1])]; let distance = Math.sqrt(Math.pow(diff[0], 2) + Math.pow(diff[1], 2)).toFixed(2)