From 0667dd70d88e61435c8fada3739fde541d18d274 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Fri, 9 Aug 2024 23:03:37 -0500 Subject: [PATCH] Implement OCR --- main.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cjs b/main.cjs index 6d347b5..703b8f9 100644 --- a/main.cjs +++ b/main.cjs @@ -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);