diff --git a/app/cogs/stable_diffusion.py b/app/cogs/stable_diffusion.py index dacdd870..f0d4fac8 100644 --- a/app/cogs/stable_diffusion.py +++ b/app/cogs/stable_diffusion.py @@ -29,7 +29,8 @@ class StableDiffusion(commands.Cog): async def sd( self, ctx: commands.Context, positive_prompt: str, negative_prompt: str ): - if ctx.channel.name == "stable-diffusion" or ctx.channel.name == "bot-testing": + allowed_channels = ["stable-diffusion", "bot-testing"] + if ctx.channel.name in allowed_channels: import socket import stable_diffusion @@ -47,6 +48,7 @@ class StableDiffusion(commands.Cog): if ctx.author.id == core_utils.my_id: ip = "192.168.1.19" enable_upscale = "true" + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(1) try: diff --git a/app/requirements.txt b/app/requirements.txt index 60f80c8f..8e034d61 100755 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -8,7 +8,6 @@ lxml markovify openai owotext -pre-commit requests requests-cache wolframalpha