E
E
Evstolyan2021-02-14 14:14:27
Python
Evstolyan, 2021-02-14 14:14:27

Problem with autopost (telegram bot)?

Hello! I ran into such a nasty issue related to autopost. I made a telegram bot whose code contains a variable that stores the channel id, wrote functions, added the bot to the telegram channel as an administrator, everything worked fine when I tested the bot on my PC, but when I uploaded it to heroku, the bot just began to save sending data, but did not send them at the specified time. Tell me what could be the reason? I understand that everything is very vague, but the code is too large and I hope for the right assumption. (PS I'm using the sqilte3 library, does that have any effect?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Gololobov, 2021-02-14
@dGololobov

heroku has protection against abandoned projects. Therefore, after a while, your bot simply turns off.
If you want to use heroku, then you need something to wake up the bot from outside.
Those. when you pulled the bot and told him to write the post to the database, he did everything.
And at that moment when it is time to make a post, the bot is sleeping.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question