From 30af1ecfe65e9f46cccc171d5613ee5148d14541 Mon Sep 17 00:00:00 2001 From: Absurdon Date: Sun, 18 Nov 2018 22:32:11 +0100 Subject: [PATCH] Removing the discord bot --- index.js | 6 +++--- lib/gather/gather.js | 14 +++++++------- package-lock.json | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index eb542ce..56bcf47 100644 --- a/index.js +++ b/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); diff --git a/lib/gather/gather.js b/lib/gather/gather.js index ee47447..93cfba1 100644 --- a/lib/gather/gather.js +++ b/lib/gather/gather.js @@ -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; } diff --git a/package-lock.json b/package-lock.json index 2a2a439..9b7406d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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=" } } },