From 2da93931cadc93bc66cbce7a037373aa5167754a Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 14 Oct 2020 20:41:18 +0200 Subject: [PATCH] fix whitelist??? Signed-off-by: loicbersier --- event/listeners/message.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/event/listeners/message.js b/event/listeners/message.js index 20d9786b..9d4e7fcd 100644 --- a/event/listeners/message.js +++ b/event/listeners/message.js @@ -43,9 +43,10 @@ class messageListener extends Listener { // Banned words let bannedWords = []; let whitelistWord = []; - if (message.guild) { + + if (message.guild) { // I forgot how the FUCK it work, that's what i get for not commenting my code bannedWords = await BannedWords.findAll({where: {word: Sequelize.where(Sequelize.fn('LOCATE', Sequelize.col('word'), message.content.replace(/\u200B/g, '').replace(/[\u0250-\ue007]/g, '')), Sequelize.Op.ne, 0), serverID: message.guild.id}}); - whitelistWord = await WhitelistWord.findAll({where: {word: Sequelize.where(Sequelize.fn('LOCATE', Sequelize.col('word'), message.content.replace(/\u200B/g, '').replace(/[\u0250-\ue007]/g, '')), Sequelize.Op.ne, 0), serverID: message.guild.id}}); + whitelistWord = await WhitelistWord.findAll({where: {word: message.content.replace(/\u200B/g, '').replace(/[\u0250-\ue007]/g), serverID: message.guild.id}}); } if (whitelistWord[0]) {