From c484753ee15dbe2a5ce9c6297f22fabb52ce3b7e Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 24 Feb 2018 14:59:35 -0500 Subject: New Command system --- commands/help.js | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 commands/help.js (limited to 'commands/help.js') diff --git a/commands/help.js b/commands/help.js deleted file mode 100644 index 6e97fcd..0000000 --- a/commands/help.js +++ /dev/null @@ -1,40 +0,0 @@ -exports.run = (bot, msg) => { - const { RichEmbed } = require('discord.js'); - const embed = new RichEmbed(); - embed - .setColor (0x00ae86) - .setDescription('Notice: When using a command do not include "<" and ">".\n(Example: p:suggest Test)') - .setFooter('PokeBot Beta'); - - const categories = []; - const commands = Array.from(bot.commands.keys()); - - commands.forEach(function(x) { - if (!categories.includes(bot.commands.get(x).help.category)) { - categories.push(bot.commands.get(x).help.category); - } - }); - - categories.forEach(function(x) { - let cat = ''; - commands.forEach(function(command) { - if (bot.commands.get(command).help.category == x) { - const usage = bot.commands.get(command).help.usage ? `*${bot.commands.get(command).help.usage}* ` : ''; - cat += `**p:${command}** ${usage}| ${bot.commands.get(command).help.description} \n`; - } - }); - embed.addField(`${x} |`, cat); - }); - msg.channel.send({ embed }); -}; - -exports.conf = { - aliases: [], - guildOnly: true, -}; - -exports.help = { - name: 'help', - description: 'Displays this help message.', - category: 'Getting Started', -}; -- cgit v1.2.3