From ca5184ff66e195bf7a21d6c61013f4030281bca0 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 14 Oct 2020 20:14:23 +0200 Subject: [PATCH] fix --remove --removeall and changed some alias Signed-off-by: loicbersier --- commands/admin/whitelistword.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/admin/whitelistword.js b/commands/admin/whitelistword.js index cacec84d..3a113faa 100644 --- a/commands/admin/whitelistword.js +++ b/commands/admin/whitelistword.js @@ -4,7 +4,7 @@ const whitelistWord = require('../../models').whitelistWord; class whitelistWordCommand extends Command { constructor() { super('whitelistWord', { - aliases: ['whitelistWord', 'unwhitelistword'], + aliases: ['whitelistWord', 'unwhitelistword', 'whitelist', 'unwhitelist'], category: 'admin', userPermissions: ['MANAGE_MESSAGES'], clientPermissions: ['MANAGE_MESSAGES', 'SEND_MESSAGES'], @@ -39,7 +39,7 @@ class whitelistWordCommand extends Command { args.word = args.word.replace(/[\u0250-\ue007]/g, ''); const WhitelistWord = await whitelistWord.findOne({where: {word: args.word.toLowerCase(), serverID: message.guild.id}}); - if (message.util.parsed.alias == 'unwhitelistword') { + if (message.util.parsed.alias == 'unwhitelistword' || message.util.parsed.alias == 'unwhitelist' || args.remove || args.removeall) { if (args.removeall) { whitelistWord.destroy({where: {serverID: message.guild.id}}); return message.channel.send('The whitelisted words has been reset.');