infinity_polling?

This commit is contained in:
Egor Guslyancev 2023-12-10 15:40:11 -03:00
parent 2f503cba2d
commit f898413b1f
GPG Key ID: D7E709AA465A55F9
1 changed files with 9 additions and 9 deletions

18
bot.py
View File

@ -1193,15 +1193,6 @@ def update_notify(forum: int):
"Обновился до версии " + telebot.formatting.escape_markdown(cur_version))
print(version, cur_version)
if version != cur_version:
for i in db.keys():
try:
update_notify(int(i))
print("Notified", i)
except ValueError:
pass
def process1():
bot.infinity_polling(none_stop=True)
@ -1225,5 +1216,14 @@ for i in threads:
i.daemon = True
i.start()
print(version, cur_version)
if version != cur_version:
for i in db.keys():
try:
update_notify(int(i))
print("Notified", i)
except ValueError:
pass
while True:
time.sleep(1)