diff options
| author | Alee <alee14498@gmail.com> | 2018-07-04 16:48:56 -0400 |
|---|---|---|
| committer | Alee <alee14498@gmail.com> | 2018-07-04 16:48:56 -0400 |
| commit | 300080d295f75bd01e365cde25f5d5ca7cbd848a (patch) | |
| tree | b6af53e56eb4a2b8ac9d19a7fae7670491ffcaa3 /bot_discord.js | |
| parent | 98e6fa6be72bb95d7ed069cd082cdba862e215bb (diff) | |
| download | AleeBot-2.11.0.tar.gz AleeBot-2.11.0.tar.bz2 AleeBot-2.11.0.zip | |
Release 2.11.0v2.11.0
Diffstat (limited to 'bot_discord.js')
| -rw-r--r-- | bot_discord.js | 40 |
1 files changed, 36 insertions, 4 deletions
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);
-});
|
