Closed dtaytson closed 5 years ago
I tryed to run this code with editMessageReplyMarkup and failed with "Unsupported value type for form field"
`## Not run:
bot <- Bot(token = "TOKEN") chat_id <- "CHAT_ID" message_id <- "MESSAGE ID"
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("#")) ) )
bot$editMessageReplyMarkup(chat_id, message_id, reply_markup = IKM)
Error in curl::handle_setform(handle, .list = req$fields) : Unsupported value type for form field 'reply_markup'. Calls: ... -> -> request_perform -> Execution halted
There was a little bug. I reviewed the code and it only affects to editMessageReplyMarkup. It is fixed since version 2.3.1.
editMessageReplyMarkup
Thanks for the report!
I tryed to run this code with editMessageReplyMarkup and failed with "Unsupported value type for form field"
`## Not run:
Initialize bot
bot <- Bot(token = "TOKEN") chat_id <- "CHAT_ID" message_id <- "MESSAGE 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
End(Not run)`
Error in curl::handle_setform(handle, .list = req$fields) : Unsupported value type for form field 'reply_markup'. Calls: ... -> -> request_perform ->
Execution halted