aboutsummaryrefslogtreecommitdiff
path: root/commands/Moderation/warn.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/warn.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/warn.js')
-rw-r--r--commands/Moderation/warn.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/Moderation/warn.js b/commands/Moderation/warn.js
index 1dd0410..b8548a3 100644
--- a/commands/Moderation/warn.js
+++ b/commands/Moderation/warn.js
@@ -8,7 +8,6 @@
* *************************************/
exports.run = async (bot, msg, args) => {
- if (!msg.member.hasPermission('MANAGE_MESSAGES')) return msg.reply('You don\'t have permission to warn.');
args.shift();
const warnReason = args.join(' ');
const victim = msg.mentions.members.first();
@@ -43,6 +42,11 @@ exports.run = async (bot, msg, args) => {
);
};
+exports.checkPermission = (bot, member) => {
+ if (!member.hasPermission('MANAGE_MESSAGES')) return 'You don\'t have permission to warn.';
+ return true;
+}
+
exports.conf = {
aliases: [],
guildOnly: true,