some fixes

This commit is contained in:
Andrey
2024-06-03 19:49:46 +03:00
parent 00bb2fa74e
commit b008d07c48

View File

@@ -303,16 +303,14 @@ def telegram_bot():
if __name__ == '__main__':
telegram_bot()
try:
bot.polling(none_stop=True)
bot.enable_save_next_step_handlers(delay=2)
bot.load_next_step_handlers()
except ConnectionError as e:
if LOGS:
bot.send_message(IMPORTANT_LOGS, "Ошибка соединения, потерял войс бот связь")
except Exception as r:
if LOGS:
bot.send_message(IMPORTANT_LOGS, "Произошло что-то непредвиденное, хелп. Войс бот болеет")
finally:
if LOGS:
bot.send_message(IMPORTANT_LOGS, 'Я войс бот упал, помогите')
while True:
try:
bot.polling(none_stop=True)
bot.enable_save_next_step_handlers(delay=2)
bot.load_next_step_handlers()
except ConnectionError as e:
if LOGS:
bot.send_message(IMPORTANT_LOGS, "Ошибка соединения, потерял войс бот связь")
except Exception as r:
if LOGS:
bot.send_message(IMPORTANT_LOGS, "Произошло что-то непредвиденное, хелп. Войс бот болеет")