diff --git a/app/cogs/actual_utils.py b/app/cogs/actual_utils.py index 909aa5c7..70accaff 100644 --- a/app/cogs/actual_utils.py +++ b/app/cogs/actual_utils.py @@ -68,15 +68,23 @@ class ActualUtils(commands.Cog): @commands.command(name="sd") async def sd(self, ctx: commands.Context, *, prompt): - # if ctx.message.author.id != 144986109804412928: - # await ctx.send("Sorry, this is a paid dale-bot feature") - # return - + import socket import stable_diffusion + port = "7860" + ip = "192.168.1.80" + + # Send my requests to my gaming computer with the 3080 (if its up) + if ctx.message.author.id == 144986109804412928: + ip = "192.168.1.188" + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.settimeout(1) + try: + s.connect((ip, int(port))) + except: + ip = "192.168.1.80" + try: - ip = "192.168.1.80" - port = "7860" file_path = stable_diffusion.generate_image(ip=ip, port=port, prompt=prompt) await ctx.reply( file=discord.File(