Fix it for real?

This commit is contained in:
loicbersier 2019-08-30 00:23:00 +02:00
parent 86e90cd626
commit 482a063701

View file

@ -21,7 +21,7 @@ class messageListener extends Listener {
// Banned words
const 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}});
if (bannedWords[0].get('word')) {
if (bannedWords[0]) {
// Remove accent
let censoredMessage = message.content.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '');
// Remove zero width space character