From 43be905d5ba0e07f64c38caaa376ebc35860e2f4 Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Wed, 12 Oct 2022 20:33:20 -0700 Subject: [PATCH] fixing if else --- app/cogs/actual_utils.py | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/app/cogs/actual_utils.py b/app/cogs/actual_utils.py index ee9b112a..9e80b5ad 100644 --- a/app/cogs/actual_utils.py +++ b/app/cogs/actual_utils.py @@ -116,30 +116,30 @@ class ActualUtils(commands.Cog): s.connect((ip, int(port))) except: ip = "192.168.1.80" - try: - await ctx.defer() - original_message = await ctx.followup.send( - "Please be patient, I'm generating your image" - ) - file_path = await stable_diffusion.generate_image( - ip=ip, - port=port, - positives=positive_prompt, - negatives=negative_prompt or None, - steps=steps, - ) - await original_message.edit( - content="", - file=discord.File( - file_path, - filename="unknown.png", - ), - ) - os.remove(file_path) - except Exception as e: - await ctx.reply( - "Stable diffusion isnt running right now, sorry.\n%s" % e, - ) + try: + await ctx.defer() + original_message = await ctx.followup.send( + "Please be patient, I'm generating your image" + ) + file_path = await stable_diffusion.generate_image( + ip=ip, + port=port, + positives=positive_prompt, + negatives=negative_prompt or None, + steps=steps, + ) + await original_message.edit( + content="", + file=discord.File( + file_path, + filename="unknown.png", + ), + ) + os.remove(file_path) + except Exception as e: + await ctx.reply( + "Stable diffusion isnt running right now, sorry.\n%s" % e, + ) else: await ctx.respond("You can only do that in the stable-diffusion channel")