You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title say, Im kinda new to this telebot library, but well, I made a command to shut down the bot, and it works, but, when I restart the bot, it starts getting the messages it didn't recorded while it was off, the last message was the shutdown command, so it goes to a loop of shutting down. So I want to know how to make the bot only get updates of the messages when is on, and not the messages that it got when the script was off. Help because I don't know how to fix this
The text was updated successfully, but these errors were encountered:
Hello, @ThePinkLyna.
Since this library has not been updated for a long time, it lacks the options added in later versions of the Telegram Bot API.
If you want to add the library yourself: For Webhooks: There is an option drop_pending_updates (Pass True to drop all pending updates) in the setWebhook method. For Polling: do not call the getUpdates method.
Thank you for answering, even if it was 4 months later.
I see, well, back then I solved it just by adding a variable that increases by 1 every second, until the variable isn't on more than 10, the bot won't execute any command. It's just... That this library feels easier to use than telegraf, so i would like to stick with it a little more.✨
As the title say, Im kinda new to this telebot library, but well, I made a command to shut down the bot, and it works, but, when I restart the bot, it starts getting the messages it didn't recorded while it was off, the last message was the shutdown command, so it goes to a loop of shutting down. So I want to know how to make the bot only get updates of the messages when is on, and not the messages that it got when the script was off. Help because I don't know how to fix this
The text was updated successfully, but these errors were encountered: