fix image detection to not accept ANY mimetype
This commit is contained in:
parent
e67c0d96ca
commit
972e1a5bab
1 changed files with 4 additions and 1 deletions
|
@ -142,9 +142,12 @@ const checkImages = async (message, extraReturnTypes, video, sticker) => {
|
|||
url = url.replace(/.*\n\n/g, "")
|
||||
if (isValidUrl(url)){
|
||||
const mimetype = await getType(url, extraReturnTypes)
|
||||
// console.log(mimetype)
|
||||
if (mimetype && imageFormats.includes(mimetype)) {
|
||||
type = {name: "image", path: url, url: url, type: mimetype}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// // first check the embeds
|
||||
// if (message.embeds.length !== 0) {
|
||||
|
|
Loading…
Reference in a new issue