Starting a recurring function once a particular message has been received. #2470
Replies: 1 comment 8 replies
-
Hi. Let me try and answer the questions in reversed order:
The The Because
Because |
Beta Was this translation helpful? Give feedback.
-
Hi,
I recently started using the python-telegram-bot API. I want to write a bot where you initially choose from a bunch of options. Then, depending on which option you choose, a different recurring function is executed say every 10 minutes. I am running it on Heroku using Flask.
I know the JobQueue.run_repeating function is built for exactly this purpose but I am struggling to get it to work in my code currently. For most of my code, I have use functions from the telegram package and not the telegram.ext. I receive texts using:
update = telegram.Update.de_json(request.get_json(force=True), bot)
Then, on specific values of the text received, i would like to run/stop recurring periodic calls of functions. I haven't been able to figure out how to do this here.
Also, a more general questions, what is the purpose behind having these two different packages?
Beta Was this translation helpful? Give feedback.
All reactions