From d87bccd54e7b39ca1f0fad8605b80dc8a557896f Mon Sep 17 00:00:00 2001 From: Mohammad Date: Thu, 19 Dec 2024 21:07:36 +0330 Subject: [PATCH] feat(cli): Add users usage to `admin list` command (#1530) --- cli/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/admin.py b/cli/admin.py index 144ec89a..54c845f6 100644 --- a/cli/admin.py +++ b/cli/admin.py @@ -58,12 +58,13 @@ def list_admins( with GetDB() as db: admins: list[Admin] = crud.get_admins(db, offset=offset, limit=limit, username=username) utils.print_table( - table=Table("Username", 'Usage', 'Reseted usage', "Is sudo", + table=Table("Username", 'Usage', 'Reseted usage', "Users Usage", "Is sudo", "Created at", "Telegram ID", "Discord Webhook"), rows=[ (str(admin.username), calculate_admin_usage(admin.id), calculate_admin_reseted_usage(admin.id), + readable_size(admin.users_usage), "✔️" if admin.is_sudo else "✖️", utils.readable_datetime(admin.created_at), str(admin.telegram_id or "✖️"),