fix get users list script

This commit is contained in:
bakatrouble 2019-03-03 21:54:17 +03:00
parent 9e8782f828
commit 5c0efb068b

View File

@ -15,7 +15,7 @@ subs = Subscriber.select()
messages = [] messages = []
for sub in subs: for sub in subs:
chat = bot.send_message(sub.user_id, '.').chat chat = bot.send_message(sub.user_id, '.').chat
chat_name = escape(f'{chat.first_name or ""} {chat.last_name or ""} {chat.title or ""}'.rstrip()) chat_name = escape(f'{chat.first_name or ""} {chat.last_name or ""} {chat.title or ""}'.strip())
messages.append(f'<code>#{sub.id:<4} {sub.user_id:>14} </code><a href="tg://user?id={sub.user_id}">{chat_name}</a>') messages.append(f'<code>#{sub.id:<4} {sub.user_id:>14} </code><a href="tg://user?id={sub.user_id}">{chat_name}</a>')