summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUnknown <Alee14498@gmail.com>2017-10-21 15:43:18 -0400
committerUnknown <Alee14498@gmail.com>2017-10-21 15:43:18 -0400
commit1f245ddb081b15fbd3287aedc4f8965782e1fcc0 (patch)
tree24de6b7d52196c32c7b0d77c3aaefed6b701f191 /src
parent1933ad0e02c3aefb677b7da0bf028e007ee286ba (diff)
downloadAleeBot-1f245ddb081b15fbd3287aedc4f8965782e1fcc0.tar.gz
AleeBot-1f245ddb081b15fbd3287aedc4f8965782e1fcc0.tar.bz2
AleeBot-1f245ddb081b15fbd3287aedc4f8965782e1fcc0.zip
Starting to work on AleeBot 2.0.0
Diffstat (limited to 'src')
-rw-r--r--src/bot.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/bot.js b/src/bot.js
new file mode 100644
index 0000000..0107e72
--- /dev/null
+++ b/src/bot.js
@@ -0,0 +1,43 @@
+/*********************************************
+*
+* AleeBot for Discord servers
+* Copyright (C) 2017 AleeCorp
+*
+**********************************************/
+const Discord = require('discord.js');
+const client = new Discord.Client();
+const abVersion = "2.0.0";
+const prefix = "abb:"
+const config = require('./absettings.json');
+
+client.on('ready', () => {
+ console.log("[>] AleeBot is now ready!")
+ console.log("Running version " + abVersion + `and in ${client.guilds.size} guilds`)
+ client.user.setPresence({
+ game: {
+ name: 'with version ' + abVersion,
+ type: 0
+ }
+ });
+ client.user.setStatus('online')
+});
+
+
+client.on("message", function(message) {
+ if (message.author.bot) return;
+ if (message.channel.type === "dm") return;
+ if (message.content.indexOf(config.prefix) !== 0) return;
+
+ let command = message.content.split(" ")[0];
+ command = command.slice(prefix.length);
+
+ let args = message.content.split(" ").slice(1);
+
+ if(command === 'test'){
+ message.reply(`[SUCCESS] This command is temporarily so this command will be deleted\nRunning version ` + abVersion);
+ }
+
+});
+client.login(config.abtoken).catch(function() {
+ console.log("[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com.");
+}); \ No newline at end of file