jTelegram / jTelegramBotAPI

Java Telegram Bot API Wrapper
https://jtelegram.github.io/jTelegramBotAPI/
MIT License
20 stars 12 forks source link

How to restart a listener #56

Open Polve opened 2 years ago

Polve commented 2 years ago

I run a long-term bot that listen to telegram events and needs to react to them.

The problem is that sometimes (usually after some days/weeks of correct work), for some reason not clear that I suspect is due to intermittent network failures, the bot stops being able to communicate with telegram so I need to stop the application and restart it.

This is clearly not practical because I'm not able to know if and when the bot "disconnects" without doing a manual test, so my question is: