ReplyKeyboardMarkup {telegram.bot} | R Documentation |
Create a keyboard markup
Description
This object represents a custom keyboard with reply options.
Usage
ReplyKeyboardMarkup(
keyboard,
resize_keyboard = NULL,
one_time_keyboard = NULL,
selective = NULL
)
Arguments
keyboard |
List of button rows, each represented by a list of
|
resize_keyboard |
(Optional). Requests clients to resize the keyboard
vertically for optimal fit. Defaults to |
one_time_keyboard |
(Optional). Requests clients to hide the keyboard
as soon as it's been used. The keyboard will still be available, but
clients will automatically display the usual letter-keyboard in the
chat - the user can press a special button in the input field to see the
custom keyboard again. Defaults to |
selective |
(Optional). Use this parameter if you want to show the keyboard to specific users only. |
Examples
## Not run:
# Initialize bot
bot <- Bot(token = "TOKEN")
chat_id <- "CHAT_ID"
# Create Custom Keyboard
text <- "Aren't those custom keyboards cool?"
RKM <- ReplyKeyboardMarkup(
keyboard = list(
list(KeyboardButton("Yes, they certainly are!")),
list(KeyboardButton("I'm not quite sure")),
list(KeyboardButton("No..."))
),
resize_keyboard = FALSE,
one_time_keyboard = TRUE
)
# Send Custom Keyboard
bot$sendMessage(chat_id, text, reply_markup = RKM)
## End(Not run)
[Package telegram.bot version 3.0.0 Index]