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 newArgs = this.args.filter(item => !item.includes(url));
|
||||||
const [topText, bottomText] = newArgs.join(" ").split(/(?<!\\),/).map(elem => elem.trim());
|
const [topText, bottomText] = newArgs.join(" ").split(/(?<!\\),/).map(elem => elem.trim());
|
||||||
return {
|
return {
|
||||||
top: topText.toUpperCase().replaceAll("&", "\\&").replaceAll(">", "\\>").replaceAll("<", "\\<").replaceAll("\"", "\\"").replaceAll("'", "\\'").replaceAll("%", "\\%"),
|
top: (this.specialArgs.case ? topText : topText.toUpperCase()).replaceAll("&", "\\&").replaceAll(">", "\\>").replaceAll("<", "\\<").replaceAll("\"", "\\"").replaceAll("'", "\\'").replaceAll("%", "\\%"),
|
||||||
bottom: bottomText ? bottomText.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 description = "Generates a meme from an image (separate top/bottom text with a comma)";
|
||||||
static arguments = ["[top text]", "{bottom text}"];
|
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 requiresText = true;
|
||||||
static noText = "You need to provide some text to generate a meme!";
|
static noText = "You need to provide some text to generate a meme!";
|
||||||
|
|
|
@ -138,15 +138,16 @@
|
||||||
"WhatsApp",
|
"WhatsApp",
|
||||||
"Half Life 3",
|
"Half Life 3",
|
||||||
"Tower Defense Simulator",
|
"Tower Defense Simulator",
|
||||||
"roblox on linux 2021",
|
|
||||||
"trans rights",
|
"trans rights",
|
||||||
"balls",
|
"balls",
|
||||||
"Vivaldi",
|
"Vivaldi",
|
||||||
"Space Channel 5: Part 2",
|
"Space Channel 5: Part 2",
|
||||||
"Vib Ribbon",
|
"Vib Ribbon",
|
||||||
"[Hyperlink Blocked]",
|
"[[Hyperlink Blocked]]",
|
||||||
"Steam Deck",
|
"Steam Deck",
|
||||||
"Something big is coming.",
|
"Something big is coming.",
|
||||||
"This image has expired."
|
"This image has expired.",
|
||||||
|
"The GIF File Format",
|
||||||
|
"The clock is ticking."
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue