@@ -30,9 +30,9 @@ def button_state(self, label, disabled):
30
30
31
31
async def edit_image (self ):
32
32
try :
33
- generated_images = edit_image (self .image_bytes , self .api_content )
34
- if generated_images and isinstance (generated_images [ 0 ] , bytes ):
35
- img_file = io .BytesIO (generated_images [ 0 ] )
33
+ remix_image = edit_image (self .image_bytes , self .api_content )
34
+ if remix_image and isinstance (remix_image , bytes ):
35
+ img_file = io .BytesIO (remix_image )
36
36
await self .message .edit (attachments = [discord .File (img_file , "image.png" )])
37
37
img_file .close ()
38
38
else :
@@ -72,10 +72,10 @@ async def remix(self, interaction: discord.Interaction, image: discord.Attachmen
72
72
if not await self .check_image_dimensions (interaction , image_bytes ):
73
73
return
74
74
75
- generated_images = edit_image (image_bytes , prompt )
75
+ remix_image = edit_image (image_bytes , prompt )
76
76
77
- if generated_images and isinstance (generated_images [ 0 ] , bytes ):
78
- img_file = io .BytesIO (generated_images [ 0 ] )
77
+ if remix_image and isinstance (remix_image , bytes ):
78
+ img_file = io .BytesIO (remix_image )
79
79
await message .edit (content = None , attachments = [discord .File (img_file , "image.png" )])
80
80
view = View (prompt , image_bytes , message , prompt )
81
81
await message .edit (view = view )
0 commit comments