From 254e469986e2036a48732c8a609aec3da123b8e0 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Fri, 9 Aug 2024 19:53:30 -0500 Subject: [PATCH] I'm tired of this... --- main.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cjs b/main.cjs index de7d7bb..3cc2607 100644 --- a/main.cjs +++ b/main.cjs @@ -183,6 +183,7 @@ function getMatchingPhrase(inputString, targetCharacter) { global.clenseDegeneracy = function clenseDegeneracy(message) { let checkString = message.content; let checkArray = ["ussy", "u$sy", "us$y", "u$$y"]; + let regex = new RegExp(`^((?:.*?\n)*?.*?)${ '\\b' + abbr + '\\b'}`, 'i'); function checkLoop(content) { for (let i = 0; i < checkArray.length; i++) { if (message.content.includes(checkArray[i])) { @@ -193,7 +194,7 @@ function getMatchingPhrase(inputString, targetCharacter) { } checkLoop(checkString); console.log(checkString); - checkString.replace(/[^A-Z0-9]+/ig, ""); + checkString.replace(regex, ""); console.log(checkString); checkLoop(checkString); }