debug stuff
This commit is contained in:
parent
d343c520de
commit
287bcd6cf4
@ -188,7 +188,13 @@ module.exports = class AutoModeration extends Observer {
|
||||
//log += `\next reg: ${tmp}`;
|
||||
const fullWord = words.find((word) => word.includes(match[0]));
|
||||
|
||||
if (this.whitelist.find(fullWord) || whitelist.some((word) => word === fullWord)) continue;
|
||||
let inWL = false;
|
||||
try { // This is for debugging only
|
||||
inWL = this.whitelist.find(fullWord);
|
||||
} catch (err) {
|
||||
this.client.logger.debug(fullWord, match[0], words);
|
||||
}
|
||||
if (inWL || whitelist.some((word) => word === fullWord)) continue;
|
||||
|
||||
log += `\nMessage matched with "${reg}" in the regex list.\nMatch: ${match[0]}, Full word: ${fullWord}\nFull content: ${content}`;
|
||||
filterResult = {
|
||||
|
@ -64,7 +64,7 @@ class BinaryTree {
|
||||
*/
|
||||
find(val) {
|
||||
|
||||
val.toLowerCase();
|
||||
val = val.toLowerCase();
|
||||
|
||||
if(this.isEmpty()) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user