From 73f412322095f57724be1864c542b4cb9e86316d Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Fri, 31 Mar 2023 20:11:05 -0700 Subject: [PATCH] debug money command / remove debug options --- commands/money.js | 2 +- package.json | 2 +- structures/DayzArmbands.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/money.js b/commands/money.js index e1e9be8..beb4da4 100644 --- a/commands/money.js +++ b/commands/money.js @@ -99,7 +99,7 @@ module.exports = { if (err) return client.sendInternalError(interaction, err); }); - } else banking = banking.banking; + } else banking = banking.user; if (!client.exists(banking.guilds[GuildDB.serverID])) { const success = addUser(banking.guilds, GuildDB.serverID, targetUserID, client, GuildDB.startingBalance); diff --git a/package.json b/package.json index 6a8336f..f5bff5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayz-armbands", - "version": "5.11.4", + "version": "5.11.6", "description": "A General Purpose Discord Bot for DayZ Servers.", "main": "index.js", "nodemonConfig": { diff --git a/structures/DayzArmbands.js b/structures/DayzArmbands.js index 5e1face..a3ac0d6 100644 --- a/structures/DayzArmbands.js +++ b/structures/DayzArmbands.js @@ -22,6 +22,7 @@ class DayzArmbands extends Client { this.commands = new Collection(); this.interactionHandlers = new Collection(); this.logger = new Logger(path.join(__dirname, "..", "logs/Logs.log")); + this.timer = this.config.Dev == 'PROD.' ? minute * 5 : minute / 4; if (this.config.Token === "" || this.config.GuildID === "") throw new TypeError( @@ -543,7 +544,7 @@ class DayzArmbands extends Client { async logsUpdateTimer() { setTimeout(async () => { - console.log('---- tick ----') + if (this.config.Dev != 'PROD.') console.log('---- tick ----'); this.activePlayersTick++; await this.downloadFile(`/games/${this.config.Nitrado.UserID}/noftp/dayzxb/config/DayZServer_X1_x64.ADM`, './logs/server-logs.ADM').then(async () => { @@ -552,8 +553,7 @@ class DayzArmbands extends Client { }) }); this.logsUpdateTimer(); // restart this function - // }, minute * 5); // restart every 5 minutes - }, minute / 4); + }, this.timer); // restart every 5 minutes during production } async connectMongo(mongoURI, dbo) {