fix
This commit is contained in:
parent
f4c739a964
commit
bb9fc2208a
@ -9,7 +9,7 @@ from config import BOT_TOKEN
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
bot = Bot(BOT_TOKEN)
|
bot = Bot(BOT_TOKEN)
|
||||||
conn = get_conn()
|
conn = get_conn()
|
||||||
uids = input('Please input user ids split by spaces')
|
uids = input('Please input user ids split by spaces: ')
|
||||||
for uid in uids.split():
|
for uid in uids.split():
|
||||||
conn.root.subscribers[uid] = Subscriber.from_chat(bot.get_chat(uid))
|
conn.root.subscribers[uid] = Subscriber.from_chat(bot.get_chat(uid))
|
||||||
commit()
|
commit()
|
||||||
|
@ -14,7 +14,7 @@ def send_users_list(bot: Bot = None):
|
|||||||
|
|
||||||
subs = conn.root.subscribers.values()
|
subs = conn.root.subscribers.values()
|
||||||
|
|
||||||
messages = [f'Count: {subs.count()}\n']
|
messages = [f'Count: {len(subs)}\n']
|
||||||
for sub in subs: # type: Subscriber
|
for sub in subs: # type: Subscriber
|
||||||
msg = f'<code>#{sub.id:<4} {sub.uid:>14} </code>'
|
msg = f'<code>#{sub.id:<4} {sub.uid:>14} </code>'
|
||||||
if sub.uid < 0:
|
if sub.uid < 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user