restore try except
This commit is contained in:
parent
b8dfbe88d0
commit
c2d56f2718
@ -84,21 +84,21 @@ class ActualUtils(commands.Cog):
|
||||
except:
|
||||
ip = "192.168.1.80"
|
||||
|
||||
# try:
|
||||
file_path = await stable_diffusion.generate_image(
|
||||
ip=ip, port=port, prompt=prompt
|
||||
)
|
||||
await ctx.reply(
|
||||
file=discord.File(
|
||||
file_path,
|
||||
filename="unknown.png",
|
||||
try:
|
||||
file_path = await stable_diffusion.generate_image(
|
||||
ip=ip, port=port, prompt=prompt
|
||||
)
|
||||
await ctx.reply(
|
||||
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,
|
||||
)
|
||||
)
|
||||
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")
|
||||
async def trackdays(self, ctx: commands.Context):
|
||||
|
@ -1,6 +1,5 @@
|
||||
import base64
|
||||
import json
|
||||
import requests
|
||||
import httpx
|
||||
import socket
|
||||
import tempfile
|
||||
|
Loading…
x
Reference in New Issue
Block a user