mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
Error message for ocr, fix attachment lookup
This commit is contained in:
parent
c384cb8022
commit
2ea818f30f
3 changed files with 15 additions and 6 deletions
|
@ -18,7 +18,12 @@ module.exports = {
|
|||
let image = await getRecentImage(context, 50)
|
||||
if (!image) return editOrReply(context, { embeds: [createEmbed("warning", context, "No images found.")] })
|
||||
|
||||
console.log(image)
|
||||
|
||||
let ocr = await googleVisionOcr(context, image)
|
||||
|
||||
if(ocr.response.body.text.length == 0) return editOrReply(context, { embeds: [createEmbed("warning", context, "No text detected.")] })
|
||||
|
||||
return editOrReply(context, createEmbed("default", context, {
|
||||
thumbnail: {
|
||||
url: image
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue