diff --git a/assets/images/uncanny/uncanny6.png b/assets/images/uncanny/uncanny6.png index 6bca9e7..35e7a23 100644 Binary files a/assets/images/uncanny/uncanny6.png and b/assets/images/uncanny/uncanny6.png differ diff --git a/commands/image-editing/reddit.js b/commands/image-editing/reddit.js index 34230b2..3409a18 100644 --- a/commands/image-editing/reddit.js +++ b/commands/image-editing/reddit.js @@ -10,6 +10,8 @@ class RedditCommand extends ImageCommand { }; } + static textOptional = true; + static description = "Adds a Reddit watermark to an image"; static arguments = ["{text}"]; diff --git a/commands/image-editing/uncanny.js b/commands/image-editing/uncanny.js index ab637f3..f926ef4 100644 --- a/commands/image-editing/uncanny.js +++ b/commands/image-editing/uncanny.js @@ -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}"]; diff --git a/utils/imagedetect.js b/utils/imagedetect.js index b9f9b97..5b306a9 100644 --- a/utils/imagedetect.js +++ b/utils/imagedetect.js @@ -39,11 +39,12 @@ const videoFormats = ["video/mp4", "video/webm", "video/mov"]; const getImage = async (image, image2, video, extraReturnTypes, gifv = false, type = null, link = false) => { try { const fileNameSplit = new URL(image).pathname.split("/"); - const fileName = fileNameSplit[fileNameSplit.length - 1].split(".")[0]; + const fileName = fileNameSplit[fileNameSplit.length - 1]; + const fileNameNoExtension = fileName.slice(0, fileName.lastIndexOf(".")); const payload = { url: image2, path: image, - name: fileName + name: fileNameNoExtension }; const host = new URL(image2).host; if (gifv || (link && combined.includes(host))) {