diff --git a/classes/imageCommand.js b/classes/imageCommand.js index 9129f7f..a73f0f1 100644 --- a/classes/imageCommand.js +++ b/classes/imageCommand.js @@ -40,7 +40,7 @@ class ImageCommand extends Command { if (selection) selectedImages.delete(this.author); if (image === undefined) { runningCommands.delete(this.author); - return `${this.constructor.noImage} (Tip: try right-clicking/holding on a message and press Apps -> Select Image, then try again.)`; + return `${this.constructor.noImage} (Tip: try running your command while replying to an image (or link to an image))`; } else if (image.type === "large") { runningCommands.delete(this.author); return "That image is too large (>= 25MB)! Try using a smaller image."; diff --git a/utils/imagedetect.js b/utils/imagedetect.js index 859464d..99dadf0 100644 --- a/utils/imagedetect.js +++ b/utils/imagedetect.js @@ -142,7 +142,10 @@ const checkImages = async (message, extraReturnTypes, video, sticker) => { url = url.replace(/.*\n\n/g, "") if (isValidUrl(url)){ const mimetype = await getType(url, extraReturnTypes) - type = {name: "image", path: url, url: url, type: mimetype} + // console.log(mimetype) + if (mimetype && imageFormats.includes(mimetype)) { + type = {name: "image", path: url, url: url, type: mimetype} + } } }