From 81f0b8f47f7c22f4dbacb84ccb9d9b02b2e46eac Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Tue, 11 Apr 2023 08:13:09 -0500 Subject: [PATCH] Add comments --- main.cjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.cjs b/main.cjs index f848cef..d9a78a6 100644 --- a/main.cjs +++ b/main.cjs @@ -142,8 +142,10 @@ function getMatchingPhrase(inputString, targetCharacter) { } return matchingPhrase; } - -global.checkMessage = function checkMessage(message, runFromGlobal) { +/* + 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) { if (!runFromGlobal) { checkInsult(message); if (message.content == "<@1091120267851485215>, what are your pronouns?") {