Missing code

imgbot
kieranrobson 2022-05-14 19:14:48 +01:00
parent 7aaf705676
commit a1ac966cbe
1 changed files with 5 additions and 0 deletions

View File

@ -29,6 +29,11 @@ client.on("messageCreate", async (message) => {
await worker.load()
await worker.loadlanguage('eng')
await worker.initialize('eng')
const {
data: { text },
} = await worker.recognize(image.url)
await worker.terminate()
message.reply(text)
} catch (e) {
console.error(e)
}