restore try except

This commit is contained in:
Luke Robles 2022-10-05 18:02:47 -07:00
parent b8dfbe88d0
commit c2d56f2718
2 changed files with 14 additions and 15 deletions

View File

@ -84,21 +84,21 @@ class ActualUtils(commands.Cog):
except: except:
ip = "192.168.1.80" ip = "192.168.1.80"
# try: try:
file_path = await stable_diffusion.generate_image( file_path = await stable_diffusion.generate_image(
ip=ip, port=port, prompt=prompt ip=ip, port=port, prompt=prompt
) )
await ctx.reply( await ctx.reply(
file=discord.File( file=discord.File(
file_path, file_path,
filename="unknown.png", filename="unknown.png",
)
)
os.remove(file_path)
except Exception as e:
await ctx.reply(
"Stable diffusion isnt running right now, sorry.\n%s" % e,
) )
)
os.remove(file_path)
# except Exception as e:
# await ctx.reply(
# "Stable diffusion isnt running right now, sorry.\n%s" % e,
# )
@commands.command(name="trackdays") @commands.command(name="trackdays")
async def trackdays(self, ctx: commands.Context): async def trackdays(self, ctx: commands.Context):

View File

@ -1,6 +1,5 @@
import base64 import base64
import json import json
import requests
import httpx import httpx
import socket import socket
import tempfile import tempfile