mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
fix no image message on context ocr
This commit is contained in:
parent
c88f05a2b9
commit
c384cb8022
1 changed files with 2 additions and 2 deletions
|
@ -18,10 +18,10 @@ module.exports = {
|
|||
const { message } = args;
|
||||
|
||||
let attachment = getMessageAttachment(message)
|
||||
if(validateAttachment(attachment)){
|
||||
if(attachment && validateAttachment(attachment)){
|
||||
attachment = attachment.url
|
||||
} else {
|
||||
attachment = undefined
|
||||
delete attachment;
|
||||
}
|
||||
if(!attachment) return context.editOrRespond({ embeds: [createEmbed("warning", context, "No images found.")], flags: MessageFlags.EPHEMERAL })
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue