diff --git a/utils/imagedetect.js b/utils/imagedetect.js index 99dadf0..6106403 100644 --- a/utils/imagedetect.js +++ b/utils/imagedetect.js @@ -136,8 +136,7 @@ const checkImages = async (message, extraReturnTypes, video, sticker) => { const fileNameNoExtension = message.content.body.slice(0, message.content.body.lastIndexOf(".")); type = {name: fileNameNoExtension, path: url, url: url, type: message.content.info.mimetype} } - } - if (message.content.msgtype == "m.text") { + } else if (message.content.msgtype == "m.text") { let url = message.content.body url = url.replace(/.*\n\n/g, "") if (isValidUrl(url)){