First working build™️
This commit is contained in:
parent
9b6b010da0
commit
f70e73f479
8
main.ts
8
main.ts
@ -109,7 +109,13 @@ client.on('messageCreate', message => {
|
||||
|
||||
console.log("Found abbreviation: " + abbr);
|
||||
console.log("Phrase that matches used acronym: " + phrase);
|
||||
var rebuildMessageArray = message.content.split(new RegExp(abbr, 'i'));
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user