I don't want my bot to reply to offline messages #1676
-
When restarting my bot, it replies to all received messages since it was offline. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hey! Suggestion to your code |
Beta Was this translation helpful? Give feedback.
Hey!
Using skip_pending processes only last update, yes.
If you are so excited about skipping ALL updates, you can use delete_webhook, by passing drop_pending_updates=True.
Suggestion to your code
I recommend using bot.infinity_polling() instead of just polling. If you use simple polling, your bot may stop on system exception.
With infinity polling, this won't take place.