bug with whitelist check
This commit is contained in:
parent
b3257ae0d0
commit
98e7f74f69
@ -182,11 +182,11 @@ module.exports = class AutoModeration extends Observer {
|
||||
|
||||
for (const reg of regex) {
|
||||
|
||||
const match = content.match(new RegExp(`(?:^|\\s)${reg}`, 'iu')); // (?:^|\\s) |un
|
||||
const match = content.match(new RegExp(`(?:^|\\s)(${reg})`, 'iu')); // (?:^|\\s) |un
|
||||
|
||||
if (match) {
|
||||
//log += `\next reg: ${tmp}`;
|
||||
const fullWord = words.find((word) => word.includes(match[0]));
|
||||
const fullWord = words.find((word) => word.includes(match[1]));
|
||||
|
||||
let inWL = false;
|
||||
try { // This is for debugging only
|
||||
@ -350,7 +350,7 @@ module.exports = class AutoModeration extends Observer {
|
||||
}, [])
|
||||
};
|
||||
|
||||
logChannel.send({ embed });
|
||||
const sent = await logChannel.send({ embed });
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user