Add accuracy line to image return

This commit is contained in:
Zeva Rose 2021-06-26 23:03:14 -06:00
parent 31d554e2d2
commit 2c7380e502

View file

@ -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"),
)