mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-10 07:11:53 +00:00
Removing the discord bot
This commit is contained in:
parent
5d69f56d7a
commit
30af1ecfe6
3 changed files with 11 additions and 11 deletions
6
index.js
6
index.js
|
@ -20,9 +20,9 @@ require(path.join(__dirname, "db/index"));
|
|||
//}
|
||||
|
||||
//Initialise Discord Bot
|
||||
if (env !== "test") {
|
||||
require(path.join(__dirname, "lib/discord/bot"))(config.discordBot);
|
||||
}
|
||||
// if (env !== "test") {
|
||||
// require(path.join(__dirname, "lib/discord/bot"))(config.discordBot);
|
||||
// }
|
||||
|
||||
// Configure express
|
||||
require(path.join(__dirname, "config/express"))(app);
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
const Gatherer = require("./gatherer");
|
||||
const StateMachine = require("javascript-state-machine");
|
||||
const discordBot = require("../discord/bot")();
|
||||
// const discordBot = require("../discord/bot")();
|
||||
|
||||
function Gather (options) {
|
||||
if (options === undefined) options = {};
|
||||
|
@ -88,12 +88,12 @@ StateMachine.create({
|
|||
if (this.failsTest(user)) return false;
|
||||
this.addUser(user);
|
||||
if (!this.lobbyFull()) {
|
||||
if(this.gatherers.length > this.teamSize &&
|
||||
(null === discordBot.spamProtection.fillStatus ||
|
||||
((new Date()).getTime() - discordBot.spamProtection.fillStatus.getTime())/1000 > 180)) {
|
||||
discordBot.notifyChannel("Join the gather at https://gathers.ensl.org | " + this.gatherers.length + " players are already waiting!");
|
||||
discordBot.spamProtection.fillStatus = new Date();
|
||||
}
|
||||
// if(this.gatherers.length > this.teamSize &&
|
||||
// (null === discordBot.spamProtection.fillStatus ||
|
||||
// ((new Date()).getTime() - discordBot.spamProtection.fillStatus.getTime())/1000 > 180)) {
|
||||
// discordBot.notifyChannel("Join the gather at https://gathers.ensl.org | " + this.gatherers.length + " players are already waiting!");
|
||||
// discordBot.spamProtection.fillStatus = new Date();
|
||||
// }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -5145,7 +5145,7 @@
|
|||
"kind-of": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
|
||||
"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
|
||||
"integrity": "sha1-cpyR4thXt6QZofmqZWhcTDP1hF0="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue