diff --git a/src/structure/components/observers/Automoderation.js b/src/structure/components/observers/Automoderation.js index a279cf6..2bafc99 100644 --- a/src/structure/components/observers/Automoderation.js +++ b/src/structure/components/observers/Automoderation.js @@ -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) {