30 lines
860 B
JavaScript
30 lines
860 B
JavaScript
import ImageCommand from "../../classes/imageCommand.js";
|
|
|
|
class SpeedCommand extends ImageCommand {
|
|
constructor(client, cluster, worker, ipc, options) {
|
|
super(client, cluster, worker, ipc, options);
|
|
this.flags.push({
|
|
name: "multiplier",
|
|
type: 4,
|
|
description: "Set the speed multiplier (default: 2)",
|
|
min_value: 1
|
|
});
|
|
}
|
|
|
|
params() {
|
|
const speed = parseInt(this.type === "classic" ? this.args[0] : this.options.multiplier);
|
|
return {
|
|
speed: isNaN(speed) || speed < 1 ? 2 : speed
|
|
};
|
|
}
|
|
|
|
static description = "Makes an image sequence faster";
|
|
static aliases = ["speedup", "fast", "gifspeed", "faster"];
|
|
static arguments = ["{multiplier}"];
|
|
|
|
static requiresGIF = true;
|
|
static noImage = "You need to provide an image/GIF to speed up!";
|
|
static command = "speed";
|
|
}
|
|
|
|
export default SpeedCommand;
|