Implement OCR

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2024-08-09 23:23:38 -05:00
parent f901552f80
commit b58e7ff564

View File

@ -205,7 +205,9 @@ function getMatchingPhrase(inputString, targetCharacter) {
return; return;
} }
checkString = checkString.replace(/[^a-zA-Z0-9]/g, ''); checkString = checkString.replace(/[^a-zA-Z0-9]/g, '');
checkLoop(message, checkString); if (checkLoop(message, checkString)) {
return;
}
// Does the message have an attachment? Check the attachment with OCR // Does the message have an attachment? Check the attachment with OCR
console.log(message.attachments); console.log(message.attachments);
message.attachments.forEach(i => { message.attachments.forEach(i => {
@ -221,7 +223,9 @@ function getMatchingPhrase(inputString, targetCharacter) {
return; return;
} }
checkString = checkString.replace(/[^a-zA-Z0-9]/g, ''); checkString = checkString.replace(/[^a-zA-Z0-9]/g, '');
checkLoop(message, checkString); if (checkLoop(message, checkString)) {
return;
}
})(); })();
} }
}); });