Add buttons with a reply keyboard
Add a Telegram reply keyboard in Bots.Business and connect each button to a command using aliases.
A reply keyboard shows labelled buttons in the Telegram chat. Tapping a text button sends its label to the bot. Create matching commands or aliases so the bot knows what to do with that text.
Build a two-button menu
Create
/helpwith AnswerTell us what you need help with.and AliasesHelp.Create
/aboutwith AnswerThis bot helps you find our services.and AliasesAbout.Open
/start→ ⋮ → Options to edit its metadata.Set Answer to
Choose an option:.Set Keyboard to
Help, Aboutand save.Send
/startin Telegram and tap Help. The/helpanswer should appear.

Put buttons on separate rows
Separate labels with commas and use the literal \n sequence to start a row:
Create a command or alias for Contact before testing the third button. The Keyboard field is intended for this simple text layout; use BJS for structured buttons or advanced options.
Show a changing balance on a button
A reply button contains text, so its displayed balance is a snapshot. Send a new keyboard after the balance changes. Read the actual resource when the button is pressed: users can type or edit the label themselves.
Create these commands with empty Answer and Keyboard, and Wait for answer off. Keep /help with its Help alias from the first example.
Command /wallet:
Create a command named Balance, without a slash or spaces:
When Telegram sends Balance 3 points, the command name is Balance and params is 3 points. An alias for a whole label is unsuitable when that label keeps changing; the stable first word here is an actual command name.
For an example counter, create /demo-add-point:
Test /wallet, then /demo-add-point: the new keyboard should show the increased value. Tap Balance … points to refresh it. Typing Balance 999999 points must still show the saved value. These demoPoints are an example counter; use your own earning rules for a real balance. See resources.
Reply keyboard or inline button?
Use a reply keyboard for text choices. Use inline buttons when the action belongs underneath a particular message, such as a callback or a website link. Inline query mode is another feature; see inline bots.
If it does not work
No keyboard: give the command an Answer, save, and send the command again.
A label appears but the wrong answer runs: inspect matching aliases and any
*command.The bot is waiting for input: a known command can cancel that wait. Check the flow in Collect user input.
An old keyboard remains: send a new keyboard or use the keyboard-removal option described in the Bot reference.
Last updated
Was this helpful?