A
A
ARN0LD2020-05-17 12:07:57
Python
ARN0LD, 2020-05-17 12:07:57

How to reload bot on pyTelegramBotAPI?

Hello, I am writing a bot on pyTelegramBotAPI. I would like to restart the bot when an error is caught.

The code:

except OverridingEx: #Ловлю ошибку
          bot.send_message(message.chat.id, 'Ошибка, обратитесь к создателю (@moodguy), чтобы он перезагрузил бота.') #здесь нужно сделать перезагрузку


Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Korol, 2020-05-17
@welcome32

Drive all the code into a try except construct, which will be True in while

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question