fixing the optional arg for stable diffusion

This commit is contained in:
Luke Robles 2022-10-18 13:03:48 -07:00
parent 683166d538
commit a63407155c
2 changed files with 9 additions and 3 deletions

View File

@ -31,10 +31,14 @@ async def on_ready():
type=discord.ActivityType.listening, name="type !help" type=discord.ActivityType.listening, name="type !help"
), ),
) )
if os.getenv("DRAGON_ENV") == "prod": if os.getenv("DRAGON_ENV") == "prod":
for guild in bot.guilds: for guild in bot.guilds:
await bot.register_commands(guild_id=guild.id, force=True) await bot.register_commands(guild_id=guild.id, force=True)
await bot.get_channel(152921472304676865).send("I have reconnected") await bot.get_channel(152921472304676865).send("I have reconnected")
else:
# force register commands in test server on launch
await bot.register_commands(guild_id=826547484632678450, force=True)
@bot.listen("on_message") @bot.listen("on_message")

View File

@ -88,14 +88,16 @@ class ActualUtils(commands.Cog):
"positive_prompt", "positive_prompt",
description="The positive prompt to pass to stable diffusion", description="The positive prompt to pass to stable diffusion",
input_type="str", input_type="str",
requred=True requred=True,
) )
@option( @option(
"negative_prompt", "negative_prompt",
description="An optional set of negatives you want to pass to stable diffusion", description="An optional set of negatives you want to pass to stable diffusion",
default="" required=False,
) )
async def sd(self, ctx: commands.Context, positive_prompt: str, negative_prompt: str): async def sd(
self, ctx: commands.Context, positive_prompt: str, negative_prompt: str
):
if ctx.channel.name == "stable-diffusion": if ctx.channel.name == "stable-diffusion":
import socket import socket