some fixes
This commit is contained in:
24
voice_bot.py
24
voice_bot.py
@@ -303,16 +303,14 @@ def telegram_bot():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
telegram_bot()
|
telegram_bot()
|
||||||
try:
|
while True:
|
||||||
bot.polling(none_stop=True)
|
try:
|
||||||
bot.enable_save_next_step_handlers(delay=2)
|
bot.polling(none_stop=True)
|
||||||
bot.load_next_step_handlers()
|
bot.enable_save_next_step_handlers(delay=2)
|
||||||
except ConnectionError as e:
|
bot.load_next_step_handlers()
|
||||||
if LOGS:
|
except ConnectionError as e:
|
||||||
bot.send_message(IMPORTANT_LOGS, "Ошибка соединения, потерял войс бот связь")
|
if LOGS:
|
||||||
except Exception as r:
|
bot.send_message(IMPORTANT_LOGS, "Ошибка соединения, потерял войс бот связь")
|
||||||
if LOGS:
|
except Exception as r:
|
||||||
bot.send_message(IMPORTANT_LOGS, "Произошло что-то непредвиденное, хелп. Войс бот болеет")
|
if LOGS:
|
||||||
finally:
|
bot.send_message(IMPORTANT_LOGS, "Произошло что-то непредвиденное, хелп. Войс бот болеет")
|
||||||
if LOGS:
|
|
||||||
bot.send_message(IMPORTANT_LOGS, 'Я войс бот упал, помогите')
|
|
||||||
Reference in New Issue
Block a user