|
|
|
@ -209,7 +209,7 @@ function getMatchingPhrase(inputString, targetCharacter) {
|
|
|
|
|
(async () => {
|
|
|
|
|
// Does the message have an attachment? Check the attachment with OCR
|
|
|
|
|
console.log(message.attachments);
|
|
|
|
|
if (message.attachments.contentType.contains("image")) {
|
|
|
|
|
if (message.attachments.contentType.includes("image")) {
|
|
|
|
|
const worker = await createWorker('eng');
|
|
|
|
|
const ret = await worker.recognize(message.attachments.proxyURL);
|
|
|
|
|
console.log("OCR Results: " + ret.data.text);
|
|
|
|
|