22 lines
697 B
JavaScript
22 lines
697 B
JavaScript
import ImageCommand from "../../classes/imageCommand.js";
|
|
import { textEncode } from "../../utils/misc.js";
|
|
|
|
class WhisperCommand extends ImageCommand {
|
|
params(url) {
|
|
const newArgs = this.options.text ?? this.args.filter(item => !item.includes(url)).join(" ");
|
|
return {
|
|
caption: textEncode(newArgs)
|
|
};
|
|
}
|
|
|
|
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/GIF to add a caption!";
|
|
static command = "whisper";
|
|
}
|
|
|
|
export default WhisperCommand;
|