Closed theskylineguy closed 7 years ago
Hi,
Just returning return UpdatesListener.CONFIRMED_UPDATES_ALL;
will work for you?
https://github.com/pengrad/java-telegram-bot-api#updates-listener
I already tried this, but it doesn't seem to work for me. What else can I do?
I'm afraid it can happens because allowedUpdates
.
Try to test Api directly, or use this one
https://rapidapi.com/package/TelegramBot/functions/getUpdates
And return here if it will work for you
I get the right Updates both on https://api.telegram.org/botTOKEN/getUpdates and https://rapidapi.com/package/TelegramBot/functions/getUpdates.
The problem is not in the Telegram API, but how to confirm incoming Updates via the GetUpdates
request in setUpdatesListener
method.
I dont handle allowedUpdates
. Will release 3.1.1 today with fix
Btw, returning CONFIRMED_UPDATES_ALL
or updates.get(updates.size() - 1).updateId()
(don't increment it by yourself) works fine for me now
Can you post a snippet of any bot of yours code for comparison?
I fixed it in 3.2.0 together with Sticker updates.
Use updates.get(updates.size() - 1).updateId()
or CONFIRMED_UPDATES_ALL
Hi,
I am having some problems here: when I run the application it prints out the same first
Update
in an infinite loop, acting like it doesn't confirm it. I'm pretty sure it's an offset issue, though I don't understand how to increment its value like you explained in your documentation, since I am using theUpdatesListener
with the getUpdates request and not just the second one - using this because I need to filter only some kind ofUpdate
s. Could you clarify me how to achieve this?Here's part of the code:
Thanks in advance.