This commit is contained in:
Erik 2022-04-29 00:35:54 +03:00
parent cb221b1e5e
commit 21ad6a073e
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -183,7 +183,7 @@ module.exports = class AutoModeration extends Observer {
try { // This is for debugging only
inWL = this.whitelist.find(fullWord);
} catch (err) {
this.logger.debug(`Whitelist.find error: ${fullWord} ${match[1]} ${words}`);
this.logger.error(`Whitelist.find error: ${fullWord} ${match[1]} ${words}`);
}
if (inWL || whitelist.some((word) => word === fullWord)) continue;
@ -288,18 +288,16 @@ module.exports = class AutoModeration extends Observer {
});
if (!action) {
this.logger.debug(log);
return;
if (action) {
log += `\nSanctioned`;
await this._moderate(action, wrapper, channel, member, wrapper.format('W_FILTER_ACTION'), filterResult);
}
this.logger.debug(log + '\nSanctioned');
await this._moderate(action, wrapper, channel, member, wrapper.format('W_FILTER_ACTION'), filterResult);
} else {
this.logger.debug(log);
}
this.logger.debug(`${guild.name} WF DEBUG: ${log}`);
}
async flagMessages(message, edited) {