I'm tired of this...

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2024-08-09 20:15:57 -05:00
parent d758118272
commit a890ee51be

View File

@ -183,13 +183,13 @@ function getMatchingPhrase(inputString, targetCharacter) {
global.clenseDegeneracy = function clenseDegeneracy(message) { global.clenseDegeneracy = function clenseDegeneracy(message) {
function normalizeString(str) { function normalizeString(str) {
// Define a mapping of characters to 's' // Define a mapping of characters to 's'
const sMap = { '$': 's', '5': 's' }; const sMap = { '$': 's', '5': 's', 'š': 's'};
// Replace similar characters with 's' // Replace similar characters with 's'
return str.split('').map(char => sMap[char] || char).join(''); return str.split('').map(char => sMap[char] || char).join('');
} }
let checkString = normalizeString(message.content.toLowerCase()); let checkString = normalizeString(message.content.toLowerCase());
let checkArray = ["ussy", "ussies"]; let checkArray = ["ussy", "ussies", "uthy"];
function checkLoop(message, content) { function checkLoop(message, content) {
console.log("Checking " + content + "..."); console.log("Checking " + content + "...");
for (let i = 0; i < checkArray.length; i++) { for (let i = 0; i < checkArray.length; i++) {