diff --git a/main.py b/main.py index f3f2b6c..e910221 100755 --- a/main.py +++ b/main.py @@ -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'{sub.uid:>14} '