From 808013b29f6bbd6a81d8ac0df9fab558ffca2a1e Mon Sep 17 00:00:00 2001 From: phixxy Date: Wed, 12 Jul 2023 15:14:30 -0700 Subject: [PATCH] Fixed save_image function --- sparkytron3000.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sparkytron3000.py b/sparkytron3000.py index 0122d70..e1e1f7e 100644 --- a/sparkytron3000.py +++ b/sparkytron3000.py @@ -69,6 +69,10 @@ async def save_image(ctx): imageName = "blank_image.png" + with open(imageName, 'wb') as out_file: + print(f"Saving image: {imageName}") + shutil.copyfileobj(r.raw, out_file) + if os.path.exists(imageName): await ctx.send("Saved Image!") else: