bug with whitelist check

This commit is contained in:
Erik 2021-06-12 18:55:24 +03:00
parent b3257ae0d0
commit 98e7f74f69
No known key found for this signature in database
GPG Key ID: 7E862371D3409F16

View File

@ -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 });
}