Update Akeno/plugins/imageai.py
Browse files- Akeno/plugins/imageai.py +2 -3
Akeno/plugins/imageai.py
CHANGED
@@ -57,11 +57,10 @@ async def imgfluxai_(client: Client, message: Message):
|
|
57 |
image_bytes = await schellwithflux(question)
|
58 |
if image_bytes is None:
|
59 |
return await ok.edit_text("Failed to generate an image.")
|
60 |
-
# await ok.edit_text("Generating image, please wait...")
|
61 |
-
with Image.open(io.BytesIO(image_bytes)) as img:
|
62 |
-
img.save("testing.jpg", format="JPEG")
|
63 |
seconds_uploading = await ok.edit_text("Uploading image...")
|
64 |
seconds_time = time.time()
|
|
|
|
|
65 |
await message.reply_photo("testing.jpg", progress=progress, progress_args=(seconds_uploading, seconds_time, "Uploading image..."))
|
66 |
await seconds_image.delete()
|
67 |
except Exception as e:
|
|
|
57 |
image_bytes = await schellwithflux(question)
|
58 |
if image_bytes is None:
|
59 |
return await ok.edit_text("Failed to generate an image.")
|
|
|
|
|
|
|
60 |
seconds_uploading = await ok.edit_text("Uploading image...")
|
61 |
seconds_time = time.time()
|
62 |
+
with Image.open(io.BytesIO(image_bytes)) as img:
|
63 |
+
img.save("testing.jpg", format="JPEG")
|
64 |
await message.reply_photo("testing.jpg", progress=progress, progress_args=(seconds_uploading, seconds_time, "Uploading image..."))
|
65 |
await seconds_image.delete()
|
66 |
except Exception as e:
|