Fixed jpeg command to use proper image format
This commit is contained in:
parent
230502c274
commit
d1792d8885
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ exports.run = async (message) => {
|
||||||
message.channel.sendTyping();
|
message.channel.sendTyping();
|
||||||
const image = await require("../utils/imagedetect.js")(message);
|
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!`;
|
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("", {
|
return message.channel.createMessage("", {
|
||||||
file: buffer,
|
file: buffer,
|
||||||
name: "jpeg.jpg"
|
name: "jpeg.jpg"
|
||||||
|
@ -15,4 +15,4 @@ exports.run = async (message) => {
|
||||||
|
|
||||||
exports.aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg"];
|
exports.aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg"];
|
||||||
exports.category = 5;
|
exports.category = 5;
|
||||||
exports.help = "Adds max JPEG compression to an image";
|
exports.help = "Adds max JPEG compression to an image";
|
||||||
|
|
Loading…
Reference in a new issue