From 84243a882a254c22e18624731724de150c301a78 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Thu, 30 Mar 2023 13:26:03 -0700 Subject: [PATCH] use config for serverID --- config/config.js | 1 + package.json | 2 +- structures/DayzArmbands.js | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/config.js b/config/config.js index 1312bdd..1c95b76 100644 --- a/config/config.js +++ b/config/config.js @@ -6,6 +6,7 @@ module.exports = { Version: package.version, // (major).(feature).(revision/bug/refactoring) Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot ServerID: "1050215624053374976", + Guild: "1019008625269801032", SupportServer: "https://discord.gg/KVFJCvvFtK", //Support Server Link Token: process.env.token || "", //Discord Bot Token Scopes: ["identify", "guilds", "applications.commands"], //Discord OAuth2 Scopes diff --git a/package.json b/package.json index e94ddfd..f9f7754 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayz-armbands", - "version": "5.9.1", + "version": "5.9.2", "description": "A General Purpose Discord Bot for DayZ Servers.", "main": "index.js", "nodemonConfig": { diff --git a/structures/DayzArmbands.js b/structures/DayzArmbands.js index 02554d1..f51e451 100644 --- a/structures/DayzArmbands.js +++ b/structures/DayzArmbands.js @@ -568,11 +568,12 @@ class DayzArmbands extends Client { async logsUpdateTimer() { setTimeout(async () => { + // 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 () => { - await this.readLogs('1019008625269801032').then(() => { - if (this.activePlayersTick == 12) this.handleActivePlayersList('1019008625269801032'); + await this.readLogs(this.config.Guild).then(() => { + if (this.activePlayersTick == 12) this.handleActivePlayersList(this.config.Guild); }) }); this.logsUpdateTimer(); // restart this function