Keyboard
Store user data using our Storage API
Traditional chat bots can of course be taught to understand human language. But sometimes you want some more formal input from the user — and this is where custom keyboards can become extremely useful.
Whenever your bot sends a message, it can pass along a special keyboard with predefined reply options (see ReplyKeyboardMarkup). Telegram apps that receive the message will display your keyboard to the user. Tapping any of the buttons will immediately send the respective command. This way you can drastically simplify user interaction with your bot.
Keyboard
Below is the illustration of how a keyboard looks like.
Inline Keyboard
Here is an example on how to send an inline keyboard in MateBot Script.
URL Button
A URL button contains a hyperlink which on clicked opens up in a web browser.
An example of a URL button is illustrated in the image below.
Callback button
A callback button in an inline keyboard sends a callback query not visible to the user when pressed. You can pass a command name in callback data and the command will be executed.
The above will execute /random
command when user press the button.
Last updated