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