botframework-sdk
botframework-sdk copied to clipboard
Telegram Custom Keyboards
Hi,
I have the following function to create the channelData for a Telegram custom keyboard. However it does not work. If I wrap the reply_markup value with a JSON.stringify it does work. Is this by design?
function getTelegramKeyboardChannelData() {
return {
"method": "sendMessage",
"parameters":
{
"text": "Test Keyboard Message",
"reply_markup": {"keyboard":[[{"text":"HELLO"}]]}
}
}
}
Yes, Telegram expects to receive the reply_markup value as a serialized JSON object. Documented here: https://core.telegram.org/bots/api#sendmessage