botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Telegram Custom Keyboards

Open byrner75 opened this issue 10 years ago • 1 comments

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"}]]}
            }
        }
}

byrner75 avatar May 25 '16 16:05 byrner75

Yes, Telegram expects to receive the reply_markup value as a serialized JSON object. Documented here: https://core.telegram.org/bots/api#sendmessage

eanders-ms avatar May 25 '16 16:05 eanders-ms