From 2c7380e502ac0ce2f704dc70a6789721615ea4b7 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sat, 26 Jun 2021 23:03:14 -0600 Subject: [PATCH] Add accuracy line to image return --- jarvis/cogs/image.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jarvis/cogs/image.py b/jarvis/cogs/image.py index 57a206d..ec98541 100644 --- a/jarvis/cogs/image.py +++ b/jarvis/cogs/image.py @@ -72,8 +72,10 @@ class ImageCog(commands.Cog): ratio = tgt_size / len(file) - 0.02 bufio = BytesIO(file) + accuracy = (len(file) / tgt_size) * 100 await ctx.send( - "New size: {}".format(convert_bytesize(len(file))), + "New size: {}".format(convert_bytesize(len(file))) + + "\nAccuracy: {}".format(accuracy), file=File(bufio, filename="resized.png"), )