Fixing the options for some commands
This commit is contained in:
parent
c04c9312d2
commit
c447fb1f7e
@ -1,5 +1,5 @@
|
|||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from discord.commands import Option
|
from discord import option
|
||||||
import discord
|
import discord
|
||||||
import os
|
import os
|
||||||
import get_from_reddit
|
import get_from_reddit
|
||||||
@ -14,16 +14,15 @@ class ActualUtils(commands.Cog):
|
|||||||
@commands.slash_command(
|
@commands.slash_command(
|
||||||
guild_ids=None,
|
guild_ids=None,
|
||||||
name="youtube",
|
name="youtube",
|
||||||
aliases=["yt"],
|
|
||||||
description="Search youtube for the passed in query",
|
description="Search youtube for the passed in query",
|
||||||
)
|
)
|
||||||
async def youtube(
|
@option(
|
||||||
self,
|
"query",
|
||||||
ctx,
|
description="The search string you want to enter on youtube",
|
||||||
query: Option(
|
input_type="str",
|
||||||
str, "What video you want to search for on youtube", required=True
|
requred=True,
|
||||||
),
|
)
|
||||||
):
|
async def youtube(self, ctx, query: str):
|
||||||
import re
|
import re
|
||||||
from urllib import parse, request
|
from urllib import parse, request
|
||||||
|
|
||||||
@ -85,17 +84,20 @@ class ActualUtils(commands.Cog):
|
|||||||
name="sd",
|
name="sd",
|
||||||
description="Pass a prompt and optinal negative prompt to stable diffusion",
|
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(
|
async def sd(
|
||||||
self,
|
self, ctx: commands.Context, positive_prompt: str, negative_prompt: str
|
||||||
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,
|
|
||||||
),
|
|
||||||
):
|
):
|
||||||
|
|
||||||
if ctx.channel.name == "stable-diffusion":
|
if ctx.channel.name == "stable-diffusion":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user