2023-03-15 14:09:09 +00:00
|
|
|
import ImageCommand from "../../classes/imageCommand.js";
|
|
|
|
|
|
|
|
class FreezeCommand extends ImageCommand {
|
2023-03-19 05:10:48 +00:00
|
|
|
static category = "image-editing"
|
2023-03-15 14:09:09 +00:00
|
|
|
params() {
|
|
|
|
const frameCount = parseInt(this.options.endframe ?? this.args[0]);
|
|
|
|
return {
|
|
|
|
loop: false,
|
|
|
|
frame: isNaN(frameCount) ? -1 : frameCount
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
static init() {
|
|
|
|
super.init();
|
|
|
|
this.flags.push({
|
|
|
|
name: "endframe",
|
|
|
|
type: 4,
|
|
|
|
description: "Set the end frame (default: last frame)",
|
|
|
|
min_value: 0
|
|
|
|
});
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
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/GIF to freeze!";
|
|
|
|
static command = "freeze";
|
|
|
|
}
|
|
|
|
|
|
|
|
export default FreezeCommand;
|