Fixed issue with ImageMagick not properly outputting JPGs

This commit is contained in:
Essem 2020-02-26 11:29:13 -06:00 committed by GitHub
parent ac47394ca2
commit 230502c274
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ const typeCheck = async (image, gifv = false) => {
await writeFile(path, imageBuffer); await writeFile(path, imageBuffer);
return { return {
data: imageBuffer, data: imageBuffer,
type: imageType.ext === "mp4" ? "gif" : imageType.ext, type: imageType.ext !== "mp4" ? (imageType.ext === "jpg" ? "jpeg" : imageType.ext) : "gif",
path: path path: path
}; };
} else { } else {
@ -75,4 +75,4 @@ module.exports = async (cmdMessage) => {
// if there's no urls then check the embeds // if there's no urls then check the embeds
} }
} }
}; };