From eaf928ba8e2270b7cb51822b0dcca4c64a4279a8 Mon Sep 17 00:00:00 2001 From: phixxy Date: Fri, 19 Jan 2024 18:46:14 -0800 Subject: [PATCH] changed hard coded folder to a variable --- plugins/stable_diffusion.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/stable_diffusion.py b/plugins/stable_diffusion.py index 64f05c8..28c8c8c 100644 --- a/plugins/stable_diffusion.py +++ b/plugins/stable_diffusion.py @@ -170,13 +170,12 @@ class StableDiffusion(commands.Cog): else: folder = self.working_dir + "sfw/" except: - folder = "tmp/" + folder = self.working_dir my_filename = folder + str(time.time_ns()) + ".png" image.save(my_filename, pnginfo=pnginfo) with open(my_filename, "rb") as fh: f = discord.File(fh, filename=my_filename) - await ctx.send(file=f) - await ctx.send(prompt) + await ctx.send(prompt, file=f) except Exception as error: await self.handle_error(error) await ctx.send("My image generation service may not be running.")