Skip to content

Commit 92f94b6

Browse files
authored
Update remix.py
1 parent 4cdd64b commit 92f94b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cogs/remix.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ async def check_image_dimensions(self, interaction, image_bytes):
6565
async def remix(self, interaction: discord.Interaction, image: discord.Attachment, prompt: str):
6666
image_bytes = await image.read()
6767

68+
if not await self.check_image_dimensions(interaction, image_bytes):
69+
return
70+
6871
await interaction.response.defer()
6972
message = await interaction.followup.send("Remixing...")
7073

7174
try:
72-
if not await self.check_image_dimensions(interaction, image_bytes):
73-
return
74-
7575
remix_image = edit_image(image_bytes, prompt)
7676

7777
if remix_image and isinstance(remix_image, bytes):
@@ -86,4 +86,4 @@ async def remix(self, interaction: discord.Interaction, image: discord.Attachmen
8686
await message.edit(content="An error occurred while processing your request.")
8787

8888
async def setup(bot: commands.Bot):
89-
await bot.add_cog(Remix(bot))
89+
await bot.add_cog(Remix(bot))

0 commit comments

Comments
 (0)