From 9d2e87bed058284c9172e2118e0d1fbb12f295ae Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Wed, 17 Jun 2020 15:02:39 +0300 Subject: [PATCH] update --- main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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} '