Skip to content

Commit c307f6f

Browse files
committed
feat: admin commant for displaying the amount of banned users
1 parent f5ac09b commit c307f6f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

blackjackbot/commands/admin/commands.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,14 @@ def users_cmd(update, context):
152152
text = "Last 24 hours: {}".format(len(players))
153153

154154
update.message.reply_text(text=text)
155+
156+
157+
@admin_method
158+
def bans_cmd(update, context):
159+
"""Returns the amount of players in the last 24 hours"""
160+
db = Database()
161+
banned_users = db.get_banned_users()
162+
163+
text = f"Banned user count: {len(banned_users)}"
164+
165+
update.message.reply_text(text=text)

0 commit comments

Comments
 (0)