update function backup and keep alive
This commit is contained in:
12
bot.py
12
bot.py
@ -138,14 +138,12 @@ with open('users.json', 'r') as f:
|
|||||||
|
|
||||||
MessageLoop(bot, on_chat).run_as_thread()
|
MessageLoop(bot, on_chat).run_as_thread()
|
||||||
print("Started! Service is available.")
|
print("Started! Service is available.")
|
||||||
count = 0
|
|
||||||
while True:
|
|
||||||
time.sleep(1)
|
|
||||||
count += 1
|
|
||||||
if count == 5:
|
|
||||||
bot.getMe()
|
|
||||||
count = 0
|
|
||||||
|
|
||||||
|
while True:
|
||||||
|
time.sleep(60)
|
||||||
|
|
||||||
|
# keep alive
|
||||||
|
bot.getMe()
|
||||||
# backup
|
# backup
|
||||||
users_backup = {}
|
users_backup = {}
|
||||||
for key in users.keys():
|
for key in users.keys():
|
||||||
|
Reference in New Issue
Block a user