First working build™️
This commit is contained in:
parent
233bdbf8e7
commit
7b3f6af93f
8
main.ts
8
main.ts
@ -87,10 +87,10 @@ function matchAbbr(abbrTarget) {
|
||||
} else {
|
||||
console.log("abbrTarget: " + typeof (abbrTarget));
|
||||
console.log("abbr: " + typeof (abbr));
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function replyMessage(message, correctedMessage) {
|
||||
message.reply("Your message contains an acronym! Let me fix that for you: \n `" + 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);
|
||||
|
Loading…
Reference in New Issue
Block a user