Removed format argument from jpeg, modified bufferPromise function a bit

This commit is contained in:
TheEssem 2020-02-26 13:23:18 -06:00
parent d1792d8885
commit b7aeacdf66
2 changed files with 37 additions and 15 deletions

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("jpeg").quality(1).bufferPromise("jpeg");
const buffer = await gm(image.path).setFormat("jpeg").quality(1).bufferPromise();
return message.channel.createMessage("", {
file: buffer,
name: "jpeg.jpg"
@ -15,4 +15,4 @@ exports.run = async (message) => {
exports.aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg"];
exports.category = 5;
exports.help = "Adds max JPEG compression to an image";
exports.help = "Adds max JPEG compression to an image";