|
|
@ -208,6 +208,7 @@ function getMatchingPhrase(inputString, targetCharacter) {
|
|
|
|
checkLoop(message, checkString);
|
|
|
|
checkLoop(message, checkString);
|
|
|
|
(async () => {
|
|
|
|
(async () => {
|
|
|
|
// 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.attachment);
|
|
|
|
if (message.attachment.contentType.contains("image")) {
|
|
|
|
if (message.attachment.contentType.contains("image")) {
|
|
|
|
const worker = await createWorker('eng');
|
|
|
|
const worker = await createWorker('eng');
|
|
|
|
const ret = await worker.recognize(message.attachment.proxyURL);
|
|
|
|
const ret = await worker.recognize(message.attachment.proxyURL);
|
|
|
|