Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event onAnyMessage alway get old message received when first time run #223

Open
ductai230894 opened this issue Sep 2, 2022 · 5 comments

Comments

@ductai230894
Copy link

Hello sir,
I have problem with onAnyMessage, when I run, It always get old message first, any way to prevent this

@llnulldisk
Copy link
Contributor

Hello,
what exactly do you mean?
A user writes several messages while the bot is offline. Then the bot is started and the messages are received from old to new with onAnyMessage(). You want to receive the latest messages first?

@ductai230894
Copy link
Author

No, this message already read by bot, but when run start again, bot continue read this message, this is old message, I test with listen message from channel, maybe I'm wrong, but bot always read old message which Bot already read it

@llnulldisk
Copy link
Contributor

This shouldn't happen. Do you have any example code to reproduce this problem?

@ductai230894
Copy link
Author

this is example code, bot is admin in channel, bot already read message in channel, but when I run application again, bot continue read this message, I don't know why..
wait me 30 minute, I will capture video

@miannoodle01
Copy link

above of while (1) { longpoll.start() } write this bot.getApi().deleteWebhook();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants