You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
427 B

#!/usr/bin/env python3
from telegram import Bot
from db import get_conn, Subscriber, commit
from config import BOT_TOKEN
if __name__ == '__main__':
bot = Bot(BOT_TOKEN)
conn = get_conn()
uids = input('Please input user ids split by spaces')
for uid in uids.split():
conn.root.subscribers[uid] = Subscriber.from_chat(bot.get_chat(uid))
commit()
print('Users have been successfully imported')