Skip to content
Advertisement

Getting callback query from telegram inline buttons

I am new to telegram inline bot. I have no clue how I can retrieve the callback function of telegram’s inlinekeyboardbuttons. Would be forever greatful if someone can explain this to me how I could retrieve user response.

JavaScript

Advertisement

Answer

You have to use CallbackQueryHandler to assing function to data

If you use pattern .* then it will get all data in one function

JavaScript

You can also use pattern to assing different functions

JavaScript

Minimal working example.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement