args.remove

This commit is contained in:
loicbersier 2020-03-29 18:29:01 +02:00
parent fe75450309
commit 6c0f5cd540

View file

@ -39,7 +39,7 @@ class BannedWordsCommand extends Command {
args.word = args.word.replace(/[\u0250-\ue007]/g, ''); args.word = args.word.replace(/[\u0250-\ue007]/g, '');
const bannedWords = await BannedWords.findOne({where: {word: args.word.toLowerCase(), serverID: message.guild.id}}); const bannedWords = await BannedWords.findOne({where: {word: args.word.toLowerCase(), serverID: message.guild.id}});
if (message.util.parsed.alias == 'unbanword') { if (message.util.parsed.alias == 'unbanword' || args.remove) {
if (args.removeall) { if (args.removeall) {
BannedWords.destroy({where: {serverID: message.guild.id}}); BannedWords.destroy({where: {serverID: message.guild.id}});
return message.channel.send('The banned words have been reset.'); return message.channel.send('The banned words have been reset.');