Commit 2da93931 authored by Loïc Bersier's avatar Loïc Bersier 😎
Browse files

fix whitelist???


Signed-off-by: Loïc Bersier's avatarloicbersier <loic.bersier1@gmail.com>
parent e7e24475
......@@ -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]) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment