Skip to content

Commit

Permalink
feat(cli): Add users usage to admin list command (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImMohammad20000 authored Dec 19, 2024
1 parent b3118cb commit d87bccd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "✖️"),
Expand Down

0 comments on commit d87bccd

Please sign in to comment.