update
This commit is contained in:
		| @@ -1,4 +1,5 @@ | |||||||
| #!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||||
|  | import json | ||||||
|  |  | ||||||
| from telegram import Bot | from telegram import Bot | ||||||
|  |  | ||||||
| @@ -13,6 +14,10 @@ def send_users_list(bot: Bot = None, conn=None): | |||||||
|     if not bot: |     if not bot: | ||||||
|         bot = Bot(BOT_TOKEN) |         bot = Bot(BOT_TOKEN) | ||||||
|  |  | ||||||
|  |     try: | ||||||
|  |         with open('fake_users.json') as f: | ||||||
|  |             subs = [Subscriber(*data) for data in json.load(f).items()] | ||||||
|  |     except: | ||||||
|         subs = conn.root.subscribers.values() |         subs = conn.root.subscribers.values() | ||||||
|  |  | ||||||
|     messages = [f'Count: {len(subs)}\n'] |     messages = [f'Count: {len(subs)}\n'] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user