more logs
This commit is contained in:
1 parent
4985778033
commit
e4cb583420
1 file changed
+7
-4
@@ -166,14 +166,17 @@ class DayzArmbands extends Client {
|
|||||||
|
|
||||||
async logsUpdateTimer() {
|
async logsUpdateTimer() {
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
if (this.config.Dev != 'PROD.') console.log('---- tick ----');
|
let t = new Date();
|
||||||
|
this.log(`Logs Tick - ${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}`);
|
||||||
this.activePlayersTick++;
|
this.activePlayersTick++;
|
||||||
|
|
||||||
await DownloadNitradoFile(this, `/games/${this.config.Nitrado.UserID}/noftp/dayzxb/config/DayZServer_X1_x64.ADM`, './logs/server-logs.ADM').then(async () => {
|
await DownloadNitradoFile(this, `/games/${this.config.Nitrado.UserID}/noftp/dayzxb/config/DayZServer_X1_x64.ADM`, './logs/server-logs.ADM').then(async () => {
|
||||||
await this.readLogs(this.config.GuildID).then(async () => {
|
this.log('Downloaded logs');
|
||||||
if (this.activePlayersTick == 12) await HandleActivePlayersList(this, this.config.GuildID);
|
await this.readLogs(this.config.GuildID).then(async () => {
|
||||||
|
this.log('Analyzed logs');
|
||||||
|
if (this.activePlayersTick == 12) await HandleActivePlayersList(this, this.config.GuildID);
|
||||||
})
|
})
|
||||||
});
|
})
|
||||||
this.logsUpdateTimer(); // restart this function
|
this.logsUpdateTimer(); // restart this function
|
||||||
}, this.timer); // restart every 5 minutes during production
|
}, this.timer); // restart every 5 minutes during production
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user