cleanup
This commit is contained in:
parent
cb221b1e5e
commit
21ad6a073e
@ -183,7 +183,7 @@ module.exports = class AutoModeration extends Observer {
|
|||||||
try { // This is for debugging only
|
try { // This is for debugging only
|
||||||
inWL = this.whitelist.find(fullWord);
|
inWL = this.whitelist.find(fullWord);
|
||||||
} catch (err) {
|
} 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;
|
if (inWL || whitelist.some((word) => word === fullWord)) continue;
|
||||||
|
|
||||||
@ -288,18 +288,16 @@ module.exports = class AutoModeration extends Observer {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (!action) {
|
if (action) {
|
||||||
this.logger.debug(log);
|
log += `\nSanctioned`;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.logger.debug(log + '\nSanctioned');
|
|
||||||
await this._moderate(action, wrapper, channel, member, wrapper.format('W_FILTER_ACTION'), filterResult);
|
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) {
|
async flagMessages(message, edited) {
|
||||||
|
Loading…
Reference in New Issue
Block a user