2021-08-19 14:19:14 +00:00
|
|
|
import ImageCommand from "../../classes/imageCommand.js";
|
2021-07-12 21:02:00 +00:00
|
|
|
|
|
|
|
class WhisperCommand extends ImageCommand {
|
2021-07-14 22:23:50 +00:00
|
|
|
params(url) {
|
2022-06-07 23:26:40 +00:00
|
|
|
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
|
2021-07-12 21:02:00 +00:00
|
|
|
return {
|
2022-03-20 04:25:59 +00:00
|
|
|
caption: newArgs.replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n")
|
2021-07-12 21:02:00 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
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!";
|
2022-01-26 18:53:20 +00:00
|
|
|
static noImage = "You need to provide an image/GIF to add a caption!";
|
2021-07-12 21:02:00 +00:00
|
|
|
static command = "whisper";
|
|
|
|
}
|
|
|
|
|
2022-01-26 18:53:20 +00:00
|
|
|
export default WhisperCommand;
|