First working build™️

master
Chloe Fontenot 🏳️‍⚧️ 2023-03-31 12:33:50 +07:00
parent 9b6b010da0
commit f70e73f479
1 changed files with 7 additions and 1 deletions

@ -109,7 +109,13 @@ client.on('messageCreate', message => {
console.log("Found abbreviation: " + abbr);
console.log("Phrase that matches used acronym: " + phrase);
if (abbr !== "") {
var rebuildMessageArray = message.content.split(new RegExp(abbr, 'i'));
} else {
message.reply("Detected abbreviation, but regex matching broke. Caleb is working on this...");
break;
}
arrayRotate(rebuildMessageArray, true, 1);
rebuildMessageArray.unshift(phrase);
arrayRotate(rebuildMessageArray, true, 2);