diff --git a/main.cjs b/main.cjs index 7be75a5..6d347b5 100644 --- a/main.cjs +++ b/main.cjs @@ -208,10 +208,10 @@ function getMatchingPhrase(inputString, targetCharacter) { checkLoop(message, checkString); (async () => { // Does the message have an attachment? Check the attachment with OCR - console.log(message.attachment); - if (message.attachment.contentType.contains("image")) { + console.log(message.attachments); + if (message.attachments.contentType.contains("image")) { const worker = await createWorker('eng'); - const ret = await worker.recognize(message.attachment.proxyURL); + const ret = await worker.recognize(message.attachments.proxyURL); console.log("OCR Results: " + ret.data.text); checkString = ret.data.text; await worker.terminate();