This commit is contained in:
Erik 2021-06-09 03:28:43 +03:00
parent 8bbf3b6579
commit 17b6e7b541
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16

View File

@ -101,8 +101,13 @@ module.exports = class AutoModeration extends Observer {
if (!msg.content) return; if (!msg.content) return;
let log = `Message filter debug:`; let log = `Message filter debug:`;
log += `\nPre norm: ${msg.cleanContent}`; log += `\nPre norm: ${msg.cleanContent}`;
console.log(msg.cleanContent); let content = null;
const content = FilterUtil.normalise(FilterUtil.removeDiscordFormatting(msg.cleanContent)); try { // NOTE: Remove try-catch after debug
content = FilterUtil.normalise(FilterUtil.removeDiscordFormatting(msg.cleanContent));
} catch (err) {
this.client.logger.debug(log);
return;
}
log += `\nNormalised: ${content}`; log += `\nNormalised: ${content}`;
// match: what was matched | // match: what was matched |