This commit is contained in:
bakatrouble 2020-06-17 15:02:39 +03:00
parent 4726c01d23
commit 9d2e87bed0

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3
import json
import logging
import os
import re
@ -237,6 +237,13 @@ def users_list(update: Update, ctx: CallbackContext):
if current_chat not in subs:
return
try:
with open('fake_users.json') as f:
subs = {data[0]: Subscriber(*data) for data in json.load(f).items()}
except:
subs = conn.root.subscribers.values()
messages = [f'Count: {len(subs)}\n']
for sub in subs.values(): # type: Subscriber
msg = f'<code>{sub.uid:>14}</code> '