if (FALSE) {
# Initialize bot
bot <- Bot(token = "TOKEN")
chat_id <- "CHAT_ID"
# Create Custom Keyboard
text <- "Don't forget to send me the answer!"
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 = FALSE
)
# Send Custom Keyboard
bot$sendMessage(chat_id, text, reply_markup = RKM)
# Remove Keyboard
bot$sendMessage(
chat_id,
"Okay, thanks!",
reply_markup = ReplyKeyboardRemove()
)
}
Run the code above in your browser using DataLab