forked from Galactic/galactic-bot
aaaa
This commit is contained in:
parent
8bbf3b6579
commit
17b6e7b541
@ -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 |
|
||||||
|
Loading…
Reference in New Issue
Block a user