Fixing the options for some commands

This commit is contained in:
Luke Robles 2022-10-18 09:09:22 -07:00
parent c04c9312d2
commit c447fb1f7e

View File

@ -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":