InlineKeyboardMarkup | R Documentation |
This object represents an inline keyboard that appears right next to the message it belongs to.
InlineKeyboardMarkup(inline_keyboard)
inline_keyboard |
List of button rows, each represented by a list of
|
Note: After the user presses a callback button,
Telegram clients will display a progress bar until you call
answerCallbackQuery
. It is, therefore, necessary to
react by calling answerCallbackQuery
even if no notification
to the user is needed (e.g., without specifying any of the
optional parameters).
## Not run: # Initialize bot bot <- Bot(token = "TOKEN") chat_id <- "CHAT_ID" # Create Inline Keyboard text <- "Could you type their phone number, please?" IKM <- InlineKeyboardMarkup( inline_keyboard = list( list( InlineKeyboardButton(1), InlineKeyboardButton(2), InlineKeyboardButton(3) ), list( InlineKeyboardButton(4), InlineKeyboardButton(5), InlineKeyboardButton(6) ), list( InlineKeyboardButton(7), InlineKeyboardButton(8), InlineKeyboardButton(9) ), list( InlineKeyboardButton("*"), InlineKeyboardButton(0), InlineKeyboardButton("#") ) ) ) # Send Inline Keyboard bot$sendMessage(chat_id, text, reply_markup = IKM) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.