diff --git a/structure/client/components/observers/Automoderation.js b/structure/client/components/observers/Automoderation.js index 0680a6c..78d7e5d 100644 --- a/structure/client/components/observers/Automoderation.js +++ b/structure/client/components/observers/Automoderation.js @@ -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 }); }