diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bot_discord.js | 48 | ||||
| -rw-r--r-- | src/commands/help.js | 2 |
2 files changed, 5 insertions, 45 deletions
diff --git a/src/bot_discord.js b/src/bot_discord.js index ac035d9..3e2f67c 100644 --- a/src/bot_discord.js +++ b/src/bot_discord.js @@ -10,6 +10,7 @@ const client = new Discord.Client(); const abVersion = "2.0.0 Beta"; const prefix = "abb:"; const fs = require("fs"); +const blessed = require('blessed'); const config = require('./absettings.json'); console.log(`Welcome to AleeBot NodeJS Terminal!`); @@ -55,14 +56,6 @@ client.on("guildDelete", guild => { console.log(`[i] I have been removed from: ${guild.name} (id: ${guild.id})`); }); -/* -client.on('guildMemberAdd', member => { - member.guild.channels.find("name", "welcomes-and-byes").sendMessage(member.toString() + " has joined the server"); -}); - -client.on('guildMemberRemove', member => { - member.guild.channels.find("name", "welcomes-and-byes").sendMessage(`**${member.user.username}** has left the server`); -}); */ client.on("message", function(message) { @@ -76,42 +69,9 @@ client.on("message", function(message) { if (!message.content.startsWith(prefix)) return; - var cmd = bot.commands.get(cont[0]) - if (cmd) cmd.run(bot, message, args); - -/* - if (command === 'help') { - var embed = new Discord.RichEmbed() - .setAuthor('AleeBot ' + abVersion + ` Help and on ${client.guilds.size} servers`, "https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048") - .setDescription("Every command you input into AleeBot is `" + config.prefix + "`") - .addField("- General Commands", "ping\nuptime\ngit", true) - .setFooter("AleeCorp Copyright 2017") - .setColor("#1fd619") - message.channel.sendEmbed(embed); - } - - if (command === 'ping') { - message.reply("**PONG!** :ping_pong: " + Math.round(client.ping) + " ms"); - } - - if (command === 'uptime') { - var uptime = parseInt(client.uptime); - uptime = Math.floor(uptime / 1000); - var uptimeMinutes = Math.floor(uptime / 60); - var minutes = uptime % 60; - var hours = 0; - while (uptimeMinutes >= 60) { - hours++; - uptimeMinutes = uptimeMinutes - 60; - } - var uptimeSeconds = minutes % 60; - message.channel.send(":clock3: AleeBot has been up for " + hours + " hours, " + uptimeMinutes + " minutes, and " + uptimeSeconds + " seconds.") - } - - if (command === 'git') { - message.author.send("I can see you want to contribute to this project.\nHere's the link: https://github.com/AleeCorp/AleeBot") - } - */ + var cmd = client.commands.get(cont[0]) + if (cmd) cmd.run(client, message, args); + }); client.login(config.abtoken).catch(function() { console.log("[X] Login failed. Please contact Alee14#9928 or email him at alee14498@gmail.com."); diff --git a/src/commands/help.js b/src/commands/help.js index a57a7d5..e191bc1 100644 --- a/src/commands/help.js +++ b/src/commands/help.js @@ -1,4 +1,4 @@ -module.exports.run = async (bot, message, args) => { +module.exports.run = async (client, message, args) => { var embed = new Discord.RichEmbed() .setAuthor('AleeBot ' + abVersion + ` Help and on ${client.guilds.size} servers`, "https://cdn.discordapp.com/avatars/282547024547545109/6c147a444ae328c38145ef1f74169e38.png?size=2048") .setDescription("Every command you input into AleeBot is `" + config.prefix + "`") |
