added logging to file, update every 20min instead of 30min

main
Benjamin Kraft 4 months ago
parent 8619bcf47e
commit 11b6939335
  1. 3
      .gitignore
  2. 2
      package.json
  3. 4
      src/bot.ts

3
.gitignore vendored

@ -3,4 +3,5 @@ old.py
node_modules node_modules
out out
.env .env
players.json players.json
output.log

@ -5,7 +5,7 @@
"main": "out/index.js", "main": "out/index.js",
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"start": "node out/index.js", "start": "node out/index.js 2>&1 | tee output.log",
"deploy-commands": "node out/deploy-commands.js" "deploy-commands": "node out/deploy-commands.js"
}, },
"repository": { "repository": {

@ -18,7 +18,7 @@ export class UEMEloBot extends Client {
this.commands = commands; this.commands = commands;
const token = await this.login(); const token = await this.login();
console.log(`Discord Token: ${token}`); console.log(`Discord Token: ${token}`);
setInterval(this.updatePlayers.bind(this), 30 * 60 * 1000); setInterval(this.updatePlayers.bind(this), 20 * 60 * 1000);
await this.updatePlayers(); await this.updatePlayers();
}); });
} }
@ -120,4 +120,4 @@ export class UEMEloBot extends Client {
process.exit(0); process.exit(0);
}); });
} }
} }

Loading…
Cancel
Save