use config

This commit is contained in:
SowinskiBraeden committed 2023-03-30 13:27:39 -07:00
1 parent 84243a882a
commit e17ed80ac2
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -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
+3 -3
View File
@@ -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