big ol if else to make this only work in the stable-diffusion channel

This commit is contained in:
Luke Robles 2022-10-12 17:38:35 -07:00
parent 5e84357b8c
commit 2bc0c959ab

View File

@ -97,6 +97,8 @@ class ActualUtils(commands.Cog):
required=False, required=False,
), ),
): ):
if ctx.channel.name == "stable-diffusion":
import socket import socket
import stable_diffusion import stable_diffusion
@ -114,7 +116,6 @@ class ActualUtils(commands.Cog):
s.connect((ip, int(port))) s.connect((ip, int(port)))
except: except:
ip = "192.168.1.80" ip = "192.168.1.80"
try: try:
await ctx.defer() await ctx.defer()
original_message = await ctx.followup.send( original_message = await ctx.followup.send(
@ -139,6 +140,8 @@ class ActualUtils(commands.Cog):
await ctx.reply( await ctx.reply(
"Stable diffusion isnt running right now, sorry.\n%s" % e, "Stable diffusion isnt running right now, sorry.\n%s" % e,
) )
else:
await ctx.respond("You can only do that in the stable-diffusion channel")
@commands.has_role("Track day gamers") @commands.has_role("Track day gamers")
@commands.slash_command( @commands.slash_command(