From c447fb1f7e9e2e8ac3e6e12c969db0febce83e42 Mon Sep 17 00:00:00 2001 From: Luke Robles Date: Tue, 18 Oct 2022 09:09:22 -0700 Subject: [PATCH] Fixing the options for some commands --- app/cogs/actual_utils.py | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/app/cogs/actual_utils.py b/app/cogs/actual_utils.py index 2aade524..6ce17ff6 100644 --- a/app/cogs/actual_utils.py +++ b/app/cogs/actual_utils.py @@ -1,5 +1,5 @@ from discord.ext import commands -from discord.commands import Option +from discord import option import discord import os import get_from_reddit @@ -14,16 +14,15 @@ class ActualUtils(commands.Cog): @commands.slash_command( guild_ids=None, name="youtube", - aliases=["yt"], description="Search youtube for the passed in query", ) - async def youtube( - self, - ctx, - query: Option( - str, "What video you want to search for on youtube", required=True - ), - ): + @option( + "query", + description="The search string you want to enter on youtube", + input_type="str", + requred=True, + ) + async def youtube(self, ctx, query: str): import re from urllib import parse, request @@ -85,17 +84,20 @@ class ActualUtils(commands.Cog): name="sd", description="Pass a prompt and optinal negative prompt to stable diffusion", ) + @option( + "positive_prompt", + description="The positive prompt to pass to stable diffusion", + input_type="str", + requred=True, + ) + @option( + "negative_prompt", + description="An options set of negatives you want to pass to stablediffusion", + input_type="str", + requred=False, + ) async def sd( - self, - ctx: commands.Context, - positive_prompt: Option( - str, "The positive prompt to send to stable-diffusion", required=True - ), - negative_prompt: Option( - str, - "An optinal negative prompt to send to stable-diffusion", - required=False, - ), + self, ctx: commands.Context, positive_prompt: str, negative_prompt: str ): if ctx.channel.name == "stable-diffusion":