1
votes

I've built a small telegram bot using python-telegram-bot.

When a conversation is started,I add a periodical job to the job queue and then message back to the user every X minutes.

Problem is when my bot goes offline (maintenance, failures, etc), the jobqueue is lost and clients do not receive updates anymore unless they send /start again

I could maybe store all chat_ids in a persistent queue and restore them at startup but how do I send a message without responding to an update ?

1

1 Answers

0
votes

you have lots of options. at first you need to store all chat_ids. you can do it in database or simple text file. then you need a trigger in order to start sending messages. I'm not familiar with your technology but i just create simple service in order to do it.