E
E
Eugene2017-03-04 15:08:42
Messengers
Eugene, 2017-03-04 15:08:42

How to make a keyboard for a bot?

Previously, there was a bot in php using switch.
But with large dialogs, you get huge code.
For example, such structure:
There is a DB with positions. There is an item in the menu - search by name.
I select the menu, assign the code to the user, that he is at this stage and wait for the text from him. I receive the text, process and send the result, if there are several matches, then the user still chooses the right one.
All this in a bunch of steps and for a long time.
Then I decided to look at php telegram bot.
How correctly to implement it on the given library? Are there any live examples of working with keyboards and further processing of the received data?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question