mrmBot-Matrix/commands/image-editing/slow.js

33 lines
806 B
JavaScript
Raw Normal View History

import ImageCommand from "../../classes/imageCommand.js";
class SlowCommand extends ImageCommand {
params() {
2022-03-31 19:53:22 +00:00
const speed = parseInt(this.type === "classic" ? this.args[0] : this.options.multiplier);
return {
slow: true,
speed: isNaN(speed) ? 2 : speed
};
}
static init() {
super.init();
this.flags.push({
name: "multiplier",
type: 4,
description: "Set the speed multiplier (default: 2)",
min_value: 1
});
return this;
}
static description = "Makes an image sequence slower";
static aliases = ["slowdown", "slower", "gifspeed2"];
static arguments = ["{multiplier}"];
static requiresGIF = true;
static noImage = "You need to provide an image/GIF to slow down!";
static command = "speed";
}
export default SlowCommand;