From 7a8d6741301d92acd4aa3711bba9994ffbd504d3 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Thu, 26 Oct 2023 11:49:17 -0700 Subject: [PATCH] we dont need pre-commit in the bot --- app/cogs/stable_diffusion.py | 4 +++- app/requirements.txt | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) 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