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) Version: package.version, // (major).(feature).(revision/bug/refactoring)
Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot Admins: ["362791661274660874", "329371697570381824"], // Admins of the bot
ServerID: "1050215624053374976", ServerID: "1050215624053374976",
Guild: "1019008625269801032", Guild: process.env.GuildID || "",
SupportServer: "https://discord.gg/KVFJCvvFtK", //Support Server Link SupportServer: "https://discord.gg/KVFJCvvFtK", //Support Server Link
Token: process.env.token || "", //Discord Bot Token Token: process.env.token || "", //Discord Bot Token
Scopes: ["identify", "guilds", "applications.commands"], //Discord OAuth2 Scopes 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.interactionHandlers = new Collection();
this.logger = new Logger(path.join(__dirname, "..", "logs/Logs.log")); this.logger = new Logger(path.join(__dirname, "..", "logs/Logs.log"));
if (this.config.Token === "") if (this.config.Token === "" || this.config.GuildID === "")
throw new TypeError( throw new TypeError(
"The config.js is not filled out. Please make sure nothing is blank, otherwise the bot will not work properly." "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++; 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.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(() => { await this.readLogs(this.config.GuildID).then(() => {
if (this.activePlayersTick == 12) this.handleActivePlayersList(this.config.Guild); if (this.activePlayersTick == 12) this.handleActivePlayersList(this.config.GuildID);
}) })
}); });
this.logsUpdateTimer(); // restart this function this.logsUpdateTimer(); // restart this function