Correct spam bug, properly this time
This commit is contained in:
parent
6d299d00d3
commit
d49f461c93
10
main.ts
10
main.ts
@ -81,12 +81,12 @@ 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 "";
|
||||
@ -129,7 +129,7 @@ client.on('messageCreate', message => {
|
||||
arrayRotate(rebuildMessageArray, true, 2);
|
||||
console.log(rebuildMessageArray);
|
||||
// Build into string and set to variable!
|
||||
|
||||
correctedMessage = ""; // clear old message.
|
||||
for (let j = 0; j < rebuildMessageArray.length; j++) {
|
||||
correctedMessage += rebuildMessageArray[j];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user