From e17ed80ac25d86867cf29b25d90c31bff4f3ab9c Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Thu, 30 Mar 2023 13:27:39 -0700 Subject: [PATCH] use config --- config/config.js | 2 +- structures/DayzArmbands.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/config.js b/config/config.js index 1c95b76..525557e 100644 --- a/config/config.js +++ b/config/config.js @@ -6,7 +6,7 @@ module.exports = { Version: package.version, // (major).(feature).(revision/bug/refactoring) Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot ServerID: "1050215624053374976", - Guild: "1019008625269801032", + Guild: process.env.GuildID || "", 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/structures/DayzArmbands.js b/structures/DayzArmbands.js index f51e451..9d5c116 100644 --- a/structures/DayzArmbands.js +++ b/structures/DayzArmbands.js @@ -23,7 +23,7 @@ class DayzArmbands extends Client { this.interactionHandlers = new Collection(); this.logger = new Logger(path.join(__dirname, "..", "logs/Logs.log")); - if (this.config.Token === "") + if (this.config.Token === "" || this.config.GuildID === "") throw new TypeError( "The config.js is not filled out. Please make sure nothing is blank, otherwise the bot will not work properly." ); @@ -572,8 +572,8 @@ class DayzArmbands extends Client { 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(this.config.Guild).then(() => { - if (this.activePlayersTick == 12) this.handleActivePlayersList(this.config.Guild); + await this.readLogs(this.config.GuildID).then(() => { + if (this.activePlayersTick == 12) this.handleActivePlayersList(this.config.GuildID); }) }); this.logsUpdateTimer(); // restart this function