Gigabytes!

This commit is contained in:
Nexus 2023-11-11 20:18:54 +00:00
parent 0fbf5e96f4
commit 97688faead
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -1910,9 +1910,12 @@ class OtherCog(commands.Cog):
percent = round(completed / total * 100) percent = round(completed / total * 100)
if percent == 100 and completed != total: if percent == 100 and completed != total:
percent = round(completed / total * 100, 2) percent = round(completed / total * 100, 2)
total_gigabytes = total / 1024 / 1024 / 1024
completed_gigabytes = completed / 1024 / 1024 / 1024
if not percent % 10 or percent >= 90.5: if not percent % 10 or percent >= 90.5:
await msg.edit( await msg.edit(
content=f"`{chunk['status']}` - {percent}% ({completed:,}/{total:,})" content=f"`{chunk['status']}` - {percent}% "
f"({completed_gigabytes:,.2f}GB/{total_gigabytes:,.2f}GB)"
) )
else: else:
await msg.edit(content=f"`{chunk['status']}`") await msg.edit(content=f"`{chunk['status']}`")