fix get users list script

This commit is contained in:
bakatrouble 2019-03-03 21:51:17 +03:00
parent ac8b68bf8d
commit 8f7dbd45b1

View File

@ -16,6 +16,9 @@ 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'<pre>#{sub.id:>4} {sub.user_id:>20} </pre><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>')
bot.send_message(98934915, '\n'.join(messages), parse_mode='html')
for i in range(0, len(messages), 10):
sl = messages[i*10:i*10+10]
bot.send_message(98934915, '\n'.join(sl), parse_mode='html')