First working build™️
This commit is contained in:
parent
efa6dfcf7e
commit
45cd83fd38
16
main.ts
16
main.ts
@ -81,15 +81,15 @@ function matchAbbr(abbrTarget) {
|
|||||||
console.log("Looking for: " + abbrTarget);
|
console.log("Looking for: " + abbrTarget);
|
||||||
for (var abbr in abbreviationKey.target_phrases) {
|
for (var abbr in abbreviationKey.target_phrases) {
|
||||||
if (abbreviationKey.target_phrases[abbr] == abbrTarget) {
|
if (abbreviationKey.target_phrases[abbr] == abbrTarget) {
|
||||||
console.log("abbrTarget:" + typeof(abbrTarget));
|
console.log("abbrTarget: " + typeof (abbrTarget));
|
||||||
console.log("abbr: " + typeof(abbr));
|
console.log("abbr: " + typeof (abbr));
|
||||||
return abbr;
|
return abbr;
|
||||||
} else {
|
} else {
|
||||||
console.log("abbrTarget:" + typeof(abbrTarget));
|
console.log("abbrTarget: " + typeof (abbrTarget));
|
||||||
console.log("abbr: " + typeof(abbr));
|
console.log("abbr: " + typeof (abbr));
|
||||||
|
}
|
||||||
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function replyMessage(message, correctedMessage) {
|
function replyMessage(message, correctedMessage) {
|
||||||
@ -109,7 +109,9 @@ client.on('messageCreate', message => {
|
|||||||
if (abbreviationKey.target_phrases[matchMessageArray[i]] !== undefined) {
|
if (abbreviationKey.target_phrases[matchMessageArray[i]] !== undefined) {
|
||||||
//Return key
|
//Return key
|
||||||
var phrase = abbreviationKey.target_phrases[matchMessageArray[i]];
|
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("Found abbreviation: " + abbr);
|
||||||
console.log("Phrase that matches used acronym: " + phrase);
|
console.log("Phrase that matches used acronym: " + phrase);
|
||||||
|
Loading…
Reference in New Issue
Block a user