Fixed jpeg command to use proper image format

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

View file

@ -6,7 +6,7 @@ exports.run = async (message) => {
message.channel.sendTyping();
const image = await require("../utils/imagedetect.js")(message);
if (image === undefined) return `${message.author.mention}, you need to provide an image to add more JPEG!`;
const buffer = await gm(image.path).setFormat("jpg").quality(1).bufferPromise("jpg");
const buffer = await gm(image.path).setFormat("jpeg").quality(1).bufferPromise("jpeg");
return message.channel.createMessage("", {
file: buffer,
name: "jpeg.jpg"