mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
Context Menu OCR
This commit is contained in:
parent
e37de9e68b
commit
ec2ec39e25
3 changed files with 94 additions and 33 deletions
|
@ -19,17 +19,15 @@ module.exports = {
|
|||
if (!image) return editOrReply(context, { embeds: [createEmbed("warning", context, "No images found.")] })
|
||||
|
||||
let ocr = await googleVisionOcr(context, image)
|
||||
return editOrReply(context, {
|
||||
embeds: [createEmbed("default", context, {
|
||||
thumbnail: {
|
||||
url: image
|
||||
},
|
||||
description: codeblock("ansi", [ocr.response.body.text]),
|
||||
footer: {
|
||||
iconUrl: STATICS.google,
|
||||
text: `Google Cloud Vision • ${context.application.name} • Took ${ocr.timings}s`
|
||||
}
|
||||
})]
|
||||
})
|
||||
return editOrReply(context, createEmbed("default", context, {
|
||||
thumbnail: {
|
||||
url: image
|
||||
},
|
||||
description: codeblock("ansi", [ocr.response.body.text]),
|
||||
footer: {
|
||||
iconUrl: STATICS.google,
|
||||
text: `Google Cloud Vision • ${context.application.name} • Took ${ocr.timings}s`
|
||||
}
|
||||
}))
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue