reply_markup parameter.
Inline Keyboards
Inline keyboards appear attached to the message itself. Buttons can open URLs, trigger callback queries, open web apps, or send inline queries.InlineKeyboardButton
Represents a single button inside an inline keyboard.InlineKeyboardMarkup
Wraps a 2D array ofInlineKeyboardButton objects.
BLP Example
BLP Example (Styled Inline Keyboard)
answerCallbackQuery
When a user taps an inline button withcallback_data, the bot receives a callback query. You must answer it to stop the loading icon on the button.
BLP Example
Reply Keyboards
Reply keyboards replace the user’s default keyboard with custom buttons. When tapped, they send the button text as a message.KeyboardButton
Represents a single button in a reply keyboard.ReplyKeyboardMarkup
Wraps a 2D array ofKeyboardButton objects.
BLP Example
BLP Example (Styled Reply Keyboard)
ReplyKeyboardRemove
Removes the custom reply keyboard and restores the default Telegram keyboard.BLP Example
editMessageReplyMarkup
Updates the inline keyboard of an existing message without changing the message text.BLP Example
