2021-07-12 21:02:00 +00:00
|
|
|
const ImageCommand = require("../../classes/imageCommand.js");
|
|
|
|
|
|
|
|
class WhisperCommand extends ImageCommand {
|
2021-07-14 22:23:50 +00:00
|
|
|
params(url) {
|
|
|
|
const newArgs = this.args.filter(item => !item.includes(url));
|
2021-07-12 21:02:00 +00:00
|
|
|
return {
|
|
|
|
caption: newArgs.join(" ").replaceAll("&", "\\&").replaceAll(">", "\\>").replaceAll("<", "\\<").replaceAll("\"", "\\"").replaceAll("'", "\\'").replaceAll("%", "\\%")
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
static description = "Adds a Whisper style caption to an image";
|
|
|
|
static aliases = ["caption4"];
|
|
|
|
static arguments = ["[text]"];
|
|
|
|
|
|
|
|
static requiresText = true;
|
|
|
|
static noText = "You need to provide some text to add a caption!";
|
|
|
|
static noImage = "You need to provide an image to add a caption!";
|
|
|
|
static command = "whisper";
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = WhisperCommand;
|