Add comments
This commit is contained in:
parent
4d5ff053fb
commit
81f0b8f47f
4
main.cjs
4
main.cjs
@ -142,7 +142,9 @@ function getMatchingPhrase(inputString, targetCharacter) {
|
|||||||
}
|
}
|
||||||
return matchingPhrase;
|
return matchingPhrase;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
Main bot logic. Check for abbreviations by splitting the message at any non-word characters, then if we find a match, create a new array, replace the abbreviation with the phrase, then call replyMessage() and reply to the original message with the corrected one.
|
||||||
|
*/
|
||||||
global.checkMessage = function checkMessage(message, runFromGlobal) {
|
global.checkMessage = function checkMessage(message, runFromGlobal) {
|
||||||
if (!runFromGlobal) {
|
if (!runFromGlobal) {
|
||||||
checkInsult(message);
|
checkInsult(message);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user