Added Total Usage

This commit is contained in:
Whispering Wind
2024-12-17 18:38:19 +03:30
committed by GitHub
parent 97f8824eac
commit 26b299bcb9

View File

@ -56,10 +56,12 @@ def process_show_user(message):
else: else:
upload_gb = upload_bytes / (1024 ** 3) # Convert bytes to GB upload_gb = upload_bytes / (1024 ** 3) # Convert bytes to GB
download_gb = download_bytes / (1024 ** 3) # Convert bytes to GB download_gb = download_bytes / (1024 ** 3) # Convert bytes to GB
totalusage = upload_gb + download_gb
traffic_message = ( traffic_message = (
f"🔼 Upload: {upload_gb:.2f} GB\n" f"🔼 Upload: {upload_gb:.2f} GB\n"
f"🔽 Download: {download_gb:.2f} GB\n" f"🔽 Download: {download_gb:.2f} GB\n"
f"📊 Total Usage: {totalusage:.2f} GB\n"
f"🌐 Status: {status}" f"🌐 Status: {status}"
) )
except json.JSONDecodeError: except json.JSONDecodeError: