From a63407155c93f4fab522c4d02e57c73eae8ccb1b Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Tue, 18 Oct 2022 13:03:48 -0700 Subject: [PATCH] fixing the optional arg for stable diffusion --- app/bot.py | 4 ++++ app/cogs/actual_utils.py | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/bot.py b/app/bot.py index 4911f119..007650b2 100755 --- a/app/bot.py +++ b/app/bot.py @@ -31,10 +31,14 @@ async def on_ready(): type=discord.ActivityType.listening, name="type !help" ), ) + if os.getenv("DRAGON_ENV") == "prod": for guild in bot.guilds: await bot.register_commands(guild_id=guild.id, force=True) 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") diff --git a/app/cogs/actual_utils.py b/app/cogs/actual_utils.py index f7927cba..9097936f 100644 --- a/app/cogs/actual_utils.py +++ b/app/cogs/actual_utils.py @@ -88,14 +88,16 @@ class ActualUtils(commands.Cog): "positive_prompt", description="The positive prompt to pass to stable diffusion", input_type="str", - requred=True + requred=True, ) @option( "negative_prompt", 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": import socket