fix whitelist???

Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
loicbersier 2020-10-14 20:41:18 +02:00
parent e7e244753f
commit 2da93931ca

View file

@ -43,9 +43,10 @@ class messageListener extends Listener {
// Banned words // Banned words
let bannedWords = []; let bannedWords = [];
let whitelistWord = []; 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}}); 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]) { if (whitelistWord[0]) {