2020-08-28 02:34:12 +00:00
|
|
|
const magick = require("../utils/image.js");
|
2020-02-13 19:29:42 +00:00
|
|
|
|
|
|
|
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 a GIF to speed up!`;
|
2020-10-18 21:53:35 +00:00
|
|
|
const { buffer, type } = await magick.run({
|
2020-08-28 02:34:12 +00:00
|
|
|
cmd: "speed",
|
2020-10-20 01:24:53 +00:00
|
|
|
path: image.path,
|
|
|
|
onlyGIF: true
|
2020-08-28 02:34:12 +00:00
|
|
|
});
|
2020-10-20 01:24:53 +00:00
|
|
|
if (buffer === "nogif") return `${message.author.mention}, that isn't a GIF!`;
|
2020-07-23 00:54:58 +00:00
|
|
|
return {
|
|
|
|
file: buffer,
|
2020-10-20 01:24:53 +00:00
|
|
|
name: `speed.${type}`
|
2020-07-23 00:54:58 +00:00
|
|
|
};
|
2020-02-13 19:29:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
exports.aliases = ["speedup", "fast", "gifspeed"];
|
|
|
|
exports.category = 5;
|
|
|
|
exports.help = "Makes a GIF faster";
|