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

+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