From 300080d295f75bd01e365cde25f5d5ca7cbd848a Mon Sep 17 00:00:00 2001 From: Alee Date: Wed, 4 Jul 2018 16:48:56 -0400 Subject: Release 2.11.0 --- bot_discord.js | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'bot_discord.js') diff --git a/bot_discord.js b/bot_discord.js index 45da5ea..314553d 100644 --- a/bot_discord.js +++ b/bot_discord.js @@ -62,6 +62,17 @@ if (process.argv.indexOf("--debug") == -1) { }); } +if (process.argv.indexOf("--beta") == -1) { + client.login(api.abtoken).catch(function() { + log('[X] Login failed. The token that you put in is invalid, please put in a new one...'.red); + }); + +} else { + client.login(api.abbtoken).catch(function() { + log('[X] Login failed. The token that you put in is invalid, please put in a new one...'.red); + }); +} + client.commands = new Discord.Collection(); client.aliases = new Discord.Collection(); @@ -217,6 +228,31 @@ client.on('guildDelete', guild => { client.on('message', (msg) => { if (msg.author.bot) return; + + if (msg.mentions != null && msg.mentions.users != null) { + if (msg.mentions.users.has("282547024547545109")){ + if (msg.content.toLowerCase().includes("hello") || (msg.content.toLowerCase().includes("hi"))) { + msg.reply("Hi there."); + } else { + if (msg.content.toLowerCase().includes("shut") && msg.content.toLowerCase().includes("up")) { + switch (Math.floor(Math.random() * 1000) % 3) { + case 0: + msg.reply("Excuse me? Can you not speak to me in that tone...") + break; + case 1: + msg.reply("NO! I can talk as much I can!"); + break; + case 2: + msg.reply("Nah I won't...."); + break; + } + } else if (msg.content.toLowerCase().includes("how") && msg.content.toLowerCase().includes("are") && msg.content.toLowerCase().includes("you")) { + msg.reply("I'm doing OK, I suppose...") + } + } + } +} + let prefixes = JSON.parse(fs.readFileSync("./storage/prefixes.json", "utf8")); @@ -270,7 +306,3 @@ log("[X | UNCAUGHT PROMISE] " + err.stack.red); process.on('uncaughtException', function (exception) { log(exception.red); }); - -client.login(api.abtoken).catch(function() { - log('[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.'.red); -}); -- cgit v1.2.3