Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -82,9 +82,11 @@ async def img(ctx, *, prompt: str):
|
|
82 |
image_bytes = query({
|
83 |
"inputs": prompt,
|
84 |
})
|
85 |
-
|
|
|
|
|
86 |
# Send the image as a file
|
87 |
-
await ctx.reply(file=image_file)
|
88 |
|
89 |
|
90 |
@bot.command()
|
|
|
82 |
image_bytes = query({
|
83 |
"inputs": prompt,
|
84 |
})
|
85 |
+
timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
86 |
+
filename = f"generated_image_{timestamp}.png"
|
87 |
+
image_file = discord.File(io.BytesIO(image_bytes), filename=filename)
|
88 |
# Send the image as a file
|
89 |
+
await ctx.reply(content=prompt, file=image_file)
|
90 |
|
91 |
|
92 |
@bot.command()
|