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
1 changed files with 2 additions and 2 deletions

View File

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