Fixed error when there are no more frames to remove in speed

This commit is contained in:
TheEssem 2020-04-03 17:51:05 -05:00
parent b803fe0769
commit 56b382fce3

View file

@ -20,6 +20,7 @@ exports.run = async (message) => {
name: "speed.gif"
});
} else {
if (!value.Scene) return `${message.author.mention}, that GIF is already too fast!`;
const numbers = (await util.promisify(exec)(`seq 0 2 ${value.Scene.length}`)).stdout.split("\n").join(",");
const buffer = await gm().out("(").out(image.path).coalesce().out(")").out("-delete", numbers).bufferPromise(image.type, image.delay);
return message.channel.createMessage("", {