D
D
Dan2K22021-10-04 16:02:47
Python
Dan2K2, 2021-10-04 16:02:47

Telegram bot, does not work constantly and turns off after starting with the words: "process finished with exit code 0", how to fix it?

615afb433c9ea492172376.png
615afb5bd2569980027056.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vindicar, 2021-10-04
@Dan2K2

I don't understand something. The aiogram documentation and examples say that the bot should be executed by calling executor.start_polling(), but what about you?

N
nikitakakoito, 2021-11-28
@nikitakakoito

Remove bot.polling and insert
if __name__ == '__main__':
executor.start_polling(dp, skip_updates=True)
with this piece it should work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question