Added argument to freeze for setting the end frame, speed is now aware of variable framerates

This commit is contained in:
TheEssem 2021-04-19 11:04:24 -05:00
parent f21cb21d9c
commit e00671f0d5
5 changed files with 43 additions and 23 deletions

View file

@ -1,12 +1,17 @@
const ImageCommand = require("../../classes/imageCommand.js");
class FreezeCommand extends ImageCommand {
params = {
loop: false
};
params(args) {
const frameCount = parseInt(args[0]);
return {
loop: false,
frame: isNaN(frameCount) ? -1 : frameCount
};
}
static description = "Makes an image sequence only play once";
static aliases = ["noloop", "once"];
static arguments = ["{end frame number}"];
static requiresGIF = true;
static noImage = "you need to provide an image to freeze!";