indented functions

This commit is contained in:
phixxy 2024-01-30 02:02:26 -08:00
parent 4a64865076
commit 2b47c9b10d

View file

@ -211,7 +211,7 @@ class ChatGPT(commands.Cog):
await f.close() await f.close()
return destination return destination
async def generate_dalle_image(self, ctx, model, quality=None, size=None): async def generate_dalle_image(self, ctx, model, quality=None, size=None):
if ctx.author.get_role(self.premium_role): if ctx.author.get_role(self.premium_role):
prompt = ctx.message.content.split(" ", maxsplit=1)[1] prompt = ctx.message.content.split(" ", maxsplit=1)[1]
image_url = await self.get_dalle(prompt, model=model, quality=quality, size=size) image_url = await self.get_dalle(prompt, model=model, quality=quality, size=size)
@ -228,31 +228,31 @@ async def generate_dalle_image(self, ctx, model, quality=None, size=None):
await ctx.send("Sorry you must be a premium member to use this command. (!donate)") await ctx.send("Sorry you must be a premium member to use this command. (!donate)")
@commands.command( @commands.command(
description="Dalle 2", description="Dalle 2",
help="Generate an image with Dalle 2 Usage: !dalle2 (prompt)", help="Generate an image with Dalle 2 Usage: !dalle2 (prompt)",
brief="Generate Image" brief="Generate Image"
) )
async def dalle2(self, ctx): async def dalle2(self, ctx):
await self.generate_dalle_image(ctx, model="dall-e-2") await self.generate_dalle_image(ctx, model="dall-e-2")
@commands.command( @commands.command(
description="Dalle 3", description="Dalle 3",
help="Generate an image with Dalle 3 Usage: !dalle3 (prompt)", help="Generate an image with Dalle 3 Usage: !dalle3 (prompt)",
brief="Generate Image", brief="Generate Image",
aliases = ['dalle'] aliases = ['dalle']
) )
async def dalle3(self, ctx): async def dalle3(self, ctx):
await self.generate_dalle_image(ctx, model="dall-e-3") await self.generate_dalle_image(ctx, model="dall-e-3")
@commands.command( @commands.command(
description="Dalle 3 HD", description="Dalle 3 HD",
help="Generate an HD image with Dalle 3 Usage: !dalle3 (prompt)", help="Generate an HD image with Dalle 3 Usage: !dalle3 (prompt)",
brief="Generate HD Image", brief="Generate HD Image",
) )
async def dalle3hd(self, ctx): async def dalle3hd(self, ctx):
await self.generate_dalle_image(ctx, model="dall-e-3", quality="hd", size="1792x1024") await self.generate_dalle_image(ctx, model="dall-e-3", quality="hd", size="1792x1024")
@commands.command( @commands.command(