Update Akeno/plugins/imageai.py
Browse files- Akeno/plugins/imageai.py +5 -4
Akeno/plugins/imageai.py
CHANGED
@@ -60,9 +60,10 @@ async def imgfluxai_(client: Client, message: Message):
|
|
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 |
-
|
64 |
-
|
65 |
-
await
|
|
|
66 |
except Exception as e:
|
67 |
LOGS.error(str(e))
|
68 |
-
await
|
|
|
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:
|
68 |
LOGS.error(str(e))
|
69 |
+
await message.edit_text(f"An error occurred: {str(e)}")
|