aboutsummaryrefslogtreecommitdiff
path: root/commands/Moderation/jail.js
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/Moderation/jail.js
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/Moderation/jail.js')
-rw-r--r--commands/Moderation/jail.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/Moderation/jail.js b/commands/Moderation/jail.js
index 2dc50cf..87d18da 100644
--- a/commands/Moderation/jail.js
+++ b/commands/Moderation/jail.js
@@ -10,7 +10,6 @@
exports.run = async (bot, msg) => {
if (msg.guild.id != '417088992329334792') return msg.reply ('This is a PokeWorld exclusive command. Sorry!');
- if (!msg.member.hasPermission('BAN_MEMBERS')) return msg.reply('You don\'t have permission to put members in jail.');
if (!msg.guild.member(bot.user).hasPermission('MANAGE_ROLES')) return msg.reply('I cannot put anyone in jail.');
const member = msg.mentions.members.first();
@@ -36,6 +35,11 @@ exports.run = async (bot, msg) => {
}
};
+exports.checkPermission = (bot, member) => {
+ if (!member.hasPermission('BAN_MEMBERS')) return 'You don\'t have permission to put members in jail.';
+ return true;
+}
+
exports.conf = {
aliases: [],
guildOnly: true,