Open akabab opened 2 years ago
It seems options.polling.params
does not work as described in the documentation. You can use this method to customize offset
parameter when sending a getUpdates
request.
let originalGetUpdates = bot.getUpdates;
bot.getUpdates = function (form){
form.offset = pollingOffset;
return originalGetUpdates.call(bot, form);
}
I have read:
I am using the latest version of the library.
Expected Behavior
Expecting bot to ignore stacked updates and to start polling from new ones
Actual Behavior
Bot keeps receiving previous updates on starting, thoses sent when the script was not running
Since I get the last update_id when script starts
const bot = new TelegramBot(Env.TELEGRAM_BOT_TOKEN, { polling: { params: { offset: pollingOffset } } })
can't be used. Is it possible to startPolling manually with an offset param ? Thanks you