Added argument support to slow/speed, made video detection also detect images

This commit is contained in:
TheEssem 2021-04-19 20:15:32 -05:00
parent e00671f0d5
commit 7db1aa880c
4 changed files with 52 additions and 18 deletions

View file

@ -1,12 +1,17 @@
const ImageCommand = require("../../classes/imageCommand.js");
class SlowCommand extends ImageCommand {
params = {
slow: true
};
params(args) {
const speed = parseInt(args[0]);
return {
slow: true,
speed: isNaN(speed) ? 2 : speed
};
}
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 to slow down!";

View file

@ -1,8 +1,16 @@
const ImageCommand = require("../../classes/imageCommand.js");
class SpeedCommand extends ImageCommand {
params(args) {
const speed = parseInt(args[0]);
return {
speed: isNaN(speed) ? 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 to speed up!";