From d43140cc77a0fb88e2c1a49968fdf9fdfb52a08f Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Sun, 3 Mar 2019 21:38:51 +0300 Subject: [PATCH] update get users list script --- get_users_list.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/get_users_list.py b/get_users_list.py index 80515ba..6179d00 100644 --- a/get_users_list.py +++ b/get_users_list.py @@ -11,10 +11,11 @@ from config import BOT_TOKEN bot = Bot(BOT_TOKEN) subs = Subscriber.select() + messages = [] for sub in subs: chat = bot.send_message(sub.user_id, '.').chat chat_name = escape(f'{chat.first_name or ""} {chat.last_name or ""} {chat.title or ""}'.rstrip()) - messages.append(f'#{sub.id:>4} {sub.user_id:>20} {chat_name}') + messages.append(f'
#{sub.id:>4} {sub.user_id:>20} 
{chat_name}') -bot.send_message(98934915, '\n'.join(messages)) +bot.send_message(98934915, '\n'.join(messages), parse_mode='html')