diff --git a/main.ts b/main.ts index fa59178..fc53f49 100644 --- a/main.ts +++ b/main.ts @@ -127,15 +127,16 @@ function checkMessage(message) { var rebuildMessageArray = []; //console.log("Corrected Message: " + correctedMessage); if (!message.author.bot) { - if (abbreviationKey.target_phrases[matchMessageArray[i]] !== undefined) { - console.log("Has role? " + message.member.roles.cache.some(role => role.name == "Exempt from NoMoreAcronyms")); - if (message.member.roles.cache.some(role => role.name == "Exempt from NoMoreAcronyms")) { - message.react('🇵'); - message.react('🇴'); - message.react('🇬'); - return; - } + if (abbreviationKey.target_phrases[matchMessageArray[i]] !== undefined) { + console.log("Has role? " + message.member.roles.cache.some(role => role.name == "Exempt from NoMoreAcronyms")); + if (message.member.roles.cache.some(role => role.name == "Exempt from NoMoreAcronyms")) { + message.react('🇵'); + message.react('🇴'); + message.react('🇬'); + return; + } } + } matchDetected = true; abbrsUsed++; //Return key