aboutsummaryrefslogtreecommitdiff
path: root/commands/Getting Started
diff options
context:
space:
mode:
authorJustin <jtsshieh@outlook.com>2019-10-30 22:28:49 -0400
committerJustin <jtsshieh@outlook.com>2019-10-30 22:28:49 -0400
commit2c3bf24f5996753df4a2d4456949fc0b636f6366 (patch)
tree27700e9b0557d23a6fb0cbd9d4058d60d725caa0 /commands/Getting Started
parent5d778acf2066546de30f53d4d10c92a043a44a3a (diff)
downloadPokeBot-2c3bf24f5996753df4a2d4456949fc0b636f6366.tar.gz
PokeBot-2c3bf24f5996753df4a2d4456949fc0b636f6366.tar.bz2
PokeBot-2c3bf24f5996753df4a2d4456949fc0b636f6366.zip
Added an optional checkPermission function and upgraded quick.db.
Diffstat (limited to 'commands/Getting Started')
-rw-r--r--commands/Getting Started/help.js12
1 files changed, 10 insertions, 2 deletions
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 });
}