Added whisper
This commit is contained in:
parent
e640cc8f77
commit
08e49537f9
5 changed files with 119 additions and 2 deletions
21
commands/image-editing/whisper.js
Normal file
21
commands/image-editing/whisper.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
const ImageCommand = require("../../classes/imageCommand.js");
|
||||
|
||||
class WhisperCommand extends ImageCommand {
|
||||
params(args, url) {
|
||||
const newArgs = args.filter(item => !item.includes(url));
|
||||
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;
|
Loading…
Add table
Add a link
Reference in a new issue