Implement OCR
This commit is contained in:
parent
f901552f80
commit
b58e7ff564
8
main.cjs
8
main.cjs
@ -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;
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user