Fix reddit slash command text input, make filename detection split on last period
This commit is contained in:
parent
f3eea0d96a
commit
b0f4c16d50
4 changed files with 8 additions and 3 deletions
|
@ -10,6 +10,8 @@ class RedditCommand extends ImageCommand {
|
|||
};
|
||||
}
|
||||
|
||||
static textOptional = true;
|
||||
|
||||
static description = "Adds a Reddit watermark to an image";
|
||||
static arguments = ["{text}"];
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class UncannyCommand extends ImageCommand {
|
|||
return {
|
||||
caption: text1?.trim() ? text1.replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n") : random(prompts),
|
||||
caption2: text2.replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n"),
|
||||
path: `./assets/images/uncanny/${typeof this.options.phase === "string" && names.includes(this.options.phase.toLowerCase()) ? this.options.phase.toLowerCase() : random(names)}.png`,
|
||||
path: `./assets/images/uncanny/${typeof this.options.phase === "string" && names.includes(this.options.phase.toLowerCase()) ? this.options.phase.toLowerCase() : random(names.filter((val) => val !== "goated"))}.png`,
|
||||
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "helvetica"
|
||||
};
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ class UncannyCommand extends ImageCommand {
|
|||
return this;
|
||||
}
|
||||
|
||||
static textOptional = true;
|
||||
|
||||
static description = "Makes a Mr. Incredible Becomes Uncanny image (separate left/right text with a comma)";
|
||||
static aliases = ["canny", "incredible", "pain"];
|
||||
static arguments = ["{left text}", "{right text}"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue