Missing code
parent
7aaf705676
commit
a1ac966cbe
|
@ -29,6 +29,11 @@ client.on("messageCreate", async (message) => {
|
||||||
await worker.load()
|
await worker.load()
|
||||||
await worker.loadlanguage('eng')
|
await worker.loadlanguage('eng')
|
||||||
await worker.initialize('eng')
|
await worker.initialize('eng')
|
||||||
|
const {
|
||||||
|
data: { text },
|
||||||
|
} = await worker.recognize(image.url)
|
||||||
|
await worker.terminate()
|
||||||
|
message.reply(text)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue