fix
This commit is contained in:
parent
4d9a2344d9
commit
c5d7d1b3ed
@ -13,4 +13,5 @@ if __name__ == '__main__':
|
||||
for uid in uids.split():
|
||||
conn.root.subscribers[uid] = Subscriber.from_chat(bot.get_chat(uid))
|
||||
commit()
|
||||
conn.close()
|
||||
print('Users have been successfully imported')
|
||||
|
@ -3,7 +3,7 @@
|
||||
from telegram import Bot
|
||||
|
||||
from db import get_conn, Subscriber
|
||||
from config import BOT_TOKEN, ADMIN
|
||||
from config import BOT_TOKEN, MANAGEMENT_CHAT
|
||||
|
||||
|
||||
def send_users_list(bot: Bot = None):
|
||||
@ -24,7 +24,10 @@ def send_users_list(bot: Bot = None):
|
||||
messages.append(msg)
|
||||
|
||||
for i in range(0, len(messages), 40):
|
||||
bot.send_message(ADMIN, '\n'.join(messages[i:i+40]), parse_mode='html')
|
||||
bot.send_message(MANAGEMENT_CHAT, '\n'.join(messages[i:i+40]), parse_mode='html')
|
||||
|
||||
print('User list was sent to the management chat')
|
||||
conn.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user