Skip to content

Commit

Permalink
Moved users stats to a separate variable
Browse files Browse the repository at this point in the history
As f-strings can't contain backslashes
  • Loading branch information
Itz-fork committed Jun 29, 2022
1 parent ddc4295 commit 461af2d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion unzipper/modules/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,18 @@ async def send_stats(_, message: Message):
# Users count
total_users = await count_users()
total_banned_users = await count_banned_users()
usrtxt = """
**👥 Users:**
↳**Users in Database:** `{total_users}`
↳**Total Banned Users:** `{total_banned_users}`
"""
# Show status
await stats_msg.edit(f"""
**💫 Current Bot Stats 💫**
{"**👥 Users:** \n ↳**Users in Database:** `{total_users}`\n ↳**Total Banned Users:** `{total_banned_users}`\n\n" if frmow else ""}
{usrtxt if frmow else ""}
**🌐 Bandwith Usage,**
↳ **Sent:** `{humanbytes(net_usage.bytes_sent)}`
↳ **Received:** `{humanbytes(net_usage.bytes_recv)}`
Expand Down

0 comments on commit 461af2d

Please sign in to comment.