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

doesn't receive updates from inline keyboard #702

Open
SavostinVladimir opened this issue Feb 4, 2024 · 2 comments
Open

doesn't receive updates from inline keyboard #702

SavostinVladimir opened this issue Feb 4, 2024 · 2 comments

Comments

@SavostinVladimir
Copy link

https://go-telegram-bot-api.dev/examples/inline-keyboard
from this example I expect to receive updates in updates chann when click on buttons. But nothing happens. What do I do wrong?

@SavostinVladimir
Copy link
Author

I looked deeper into getUpdates method. When it invoked it returns nothing when I click any button

@VeryEvilHumna
Copy link

After 45 minutes of dealing with same issue I found a solution. This is not specified in TG or gotgbotapi's documentation, but I think you must explicitly specify that you want to receive inline keyboard updates.

u := tgbotapi.NewUpdate(0)
u.AllowedUpdates = []string{"callback_query", "message"} // add more updates that you want to receive

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

2 participants