Skip to content

Commit

Permalink
Refactor function signatures in imagine_cog.py and multi_imagine_cog.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Zingzy committed Mar 18, 2024
1 parent 605f4d6 commit c3776ca
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
11 changes: 0 additions & 11 deletions Pipfile

This file was deleted.

2 changes: 1 addition & 1 deletion cogs/imagine_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ async def model_autocomplete(self,
@app_commands.guild_only()
@app_commands.checks.cooldown(1, 15)
@app_commands.describe(prompt="Imagine a prompt", height="Height of the image", width="Width of the image", negative="The things not to include in the image", cached="Removes the image seed", nologo="Remove the logo", enhance="Disables Prompt enhancing if set to False", private="Only you can see the generated Image if set to True")
async def imagine_command(self, interaction, prompt:str, model: str = "Swizz8", width:int = 1000, height:int = 1000, negative:Optional[str] = None, cached:bool = False, nologo:bool = False, enhance:bool = True, private:bool = False):
async def imagine_command(self, interaction, prompt:str, model: str = "Swizz8", width:int = 1000, height:int = 1000, negative:str|None = None, cached:bool = False, nologo:bool = False, enhance:bool = True, private:bool = False):
await interaction.response.send_message(embed=discord.Embed(title="Generating Image", description="Please wait while we generate your image", color=discord.Color.blurple()), ephemeral=True)

if len(prompt) > 1500:
Expand Down
2 changes: 1 addition & 1 deletion cogs/multi_imagine_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ async def delete(self, interaction: discord.Interaction, button: discord.ui.Butt
@app_commands.checks.cooldown(1, 30)
@app_commands.guild_only()
@app_commands.describe(prompt="Imagine a prompt", height="Height of the image", width="Width of the image", negative="The things not to include in the image", cached="Removes the image seed", nologo="Remove the logo", enhance="Disables Prompt enhancing if set to False", private="Only you can see the generated Image if set to True")
async def multiimagine_command(self, interaction, prompt:str, width:int = 1000, height:int = 1000, negative:Optional[str] = None, cached:bool = False, nologo:bool = False, enhance:bool = True, private:bool = False):
async def multiimagine_command(self, interaction, prompt:str, width:int = 1000, height:int = 1000, negative:str|None = None, cached:bool = False, nologo:bool = False, enhance:bool = True, private:bool = False):

await interaction.response.send_message(embed=discord.Embed(title="Generating Image", description="Please wait while we generate your image", color=discord.Color.blurple()), ephemeral=True)

Expand Down
3 changes: 1 addition & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from pymongo import MongoClient
import sys
import itertools
from typing import Optional, Any

client = MongoClient(MONGODB_URI)

Expand Down Expand Up @@ -144,7 +143,7 @@ async def generate_image(
width: int = 500,
height: int = 500,
model: str = "turbo",
negative: Optional[str] = None,
negative: str|None = None,
cached: bool = False,
nologo: bool = False,
enhance: bool = True,
Expand Down

0 comments on commit c3776ca

Please sign in to comment.