Added case special arg to meme, added new playing messages

This commit is contained in:
Essem 2021-10-29 22:48:50 -05:00
parent 1cf53f9584
commit fa14ce7c35
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 10 additions and 5 deletions

View file

@ -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("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%"),
bottom: bottomText ? bottomText.toUpperCase().replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%") : ""
top: (this.specialArgs.case ? topText : topText.toUpperCase()).replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%"),
bottom: bottomText ? (this.specialArgs.case ? bottomText : bottomText.toUpperCase()).replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").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!";

View file

@ -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."
]
}