First working build™️

master
Chloe Fontenot 🏳️‍⚧️ 2023-03-31 13:20:24 +07:00
parent 233bdbf8e7
commit 7b3f6af93f
1 changed files with 12 additions and 10 deletions

@ -81,15 +81,15 @@ function matchAbbr(abbrTarget) {
console.log("Looking for: " + abbrTarget);
for (var abbr in abbreviationKey.target_phrases) {
if (abbreviationKey.target_phrases[abbr] == abbrTarget) {
console.log("abbrTarget:" + typeof(abbrTarget));
console.log("abbr: " + typeof(abbr));
console.log("abbrTarget: " + typeof (abbrTarget));
console.log("abbr: " + typeof (abbr));
return abbr;
} else {
console.log("abbrTarget:" + typeof(abbrTarget));
console.log("abbr: " + typeof(abbr));
console.log("abbrTarget: " + typeof (abbrTarget));
console.log("abbr: " + typeof (abbr));
}
}
return "";
}
}
}
function replyMessage(message, correctedMessage) {
@ -109,7 +109,9 @@ client.on('messageCreate', message => {
if (abbreviationKey.target_phrases[matchMessageArray[i]] !== undefined) {
//Return key
var phrase = abbreviationKey.target_phrases[matchMessageArray[i]];
var abbr = matchAbbr(phrase);
var abbr = matchAbbr(phrase); //abbreviationKey.target_phrases[phrase];
console.log(typeof(abbr));
console.log("Found abbreviation: " + abbr);
console.log("Phrase that matches used acronym: " + phrase);