From 2c3bf24f5996753df4a2d4456949fc0b636f6366 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 30 Oct 2019 22:28:49 -0400 Subject: Added an optional checkPermission function and upgraded quick.db. --- commands/Getting Started/help.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'commands/Getting Started/help.js') diff --git a/commands/Getting Started/help.js b/commands/Getting Started/help.js index 1fb2101..03dc3de 100644 --- a/commands/Getting Started/help.js +++ b/commands/Getting Started/help.js @@ -24,9 +24,17 @@ exports.run = (bot, msg, args) => { const commands = bot.categories.get(x); commands.forEach(cmd => { const command = bot.commands.get(x).get(cmd); - cat += `**${command.help.name}**\n`; + if (command.checkPermission != null) { + if (command.checkPermission(bot, msg.member) == true) + { + cat += `**${command.help.name}**\n`; + } + } + else { + cat += `**${command.help.name}**\n`; + } }); - embed.addField(x, cat, true); + if (cat != '') embed.addField(x, cat, true); }); msg.channel.send({ embed }); } -- cgit v1.2.3