Implement OCR
This commit is contained in:
8
main.cjs
8
main.cjs
@@ -205,7 +205,9 @@ function getMatchingPhrase(inputString, targetCharacter) {
|
||||
return;
|
||||
}
|
||||
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
|
||||
console.log(message.attachments);
|
||||
message.attachments.forEach(i => {
|
||||
@@ -221,7 +223,9 @@ function getMatchingPhrase(inputString, targetCharacter) {
|
||||
return;
|
||||
}
|
||||
checkString = checkString.replace(/[^a-zA-Z0-9]/g, '');
|
||||
checkLoop(message, checkString);
|
||||
if (checkLoop(message, checkString)) {
|
||||
return;
|
||||
}
|
||||
})();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user