Added case special arg to meme, added new playing messages
This commit is contained in:
parent
1cf53f9584
commit
fa14ce7c35
2 changed files with 10 additions and 5 deletions
|
@ -5,13 +5,17 @@ class MemeCommand extends ImageCommand {
|
|||
const newArgs = this.args.filter(item => !item.includes(url));
|
||||
const [topText, bottomText] = newArgs.join(" ").split(/(?<!\\),/).map(elem => elem.trim());
|
||||
return {
|
||||
top: topText.toUpperCase().replaceAll("&", "\\&").replaceAll(">", "\\>").replaceAll("<", "\\<").replaceAll("\"", "\\"").replaceAll("'", "\\'").replaceAll("%", "\\%"),
|
||||
bottom: bottomText ? bottomText.toUpperCase().replaceAll("&", "\\&").replaceAll(">", "\\>").replaceAll("<", "\\<").replaceAll("\"", "\\"").replaceAll("'", "\\'").replaceAll("%", "\\%") : ""
|
||||
top: (this.specialArgs.case ? topText : topText.toUpperCase()).replaceAll("&", "\\&").replaceAll(">", "\\>").replaceAll("<", "\\<").replaceAll("\"", "\\"").replaceAll("'", "\\'").replaceAll("%", "\\%"),
|
||||
bottom: bottomText ? (this.specialArgs.case ? bottomText : bottomText.toUpperCase()).replaceAll("&", "\\&").replaceAll(">", "\\>").replaceAll("<", "\\<").replaceAll("\"", "\\"").replaceAll("'", "\\'").replaceAll("%", "\\%") : ""
|
||||
};
|
||||
}
|
||||
|
||||
static description = "Generates a meme from an image (separate top/bottom text with a comma)";
|
||||
static arguments = ["[top text]", "{bottom text}"];
|
||||
static flags = [{
|
||||
name: "case",
|
||||
description: "Make the meme text case-sensitive (allows for lowercase text)"
|
||||
}];
|
||||
|
||||
static requiresText = true;
|
||||
static noText = "You need to provide some text to generate a meme!";
|
||||
|
|
|
@ -138,15 +138,16 @@
|
|||
"WhatsApp",
|
||||
"Half Life 3",
|
||||
"Tower Defense Simulator",
|
||||
"roblox on linux 2021",
|
||||
"trans rights",
|
||||
"balls",
|
||||
"Vivaldi",
|
||||
"Space Channel 5: Part 2",
|
||||
"Vib Ribbon",
|
||||
"[Hyperlink Blocked]",
|
||||
"[[Hyperlink Blocked]]",
|
||||
"Steam Deck",
|
||||
"Something big is coming.",
|
||||
"This image has expired."
|
||||
"This image has expired.",
|
||||
"The GIF File Format",
|
||||
"The clock is ticking."
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue