I am making a telegram bot using node.js and node-telegram-bot-api
library.
I answer on callback_query
and want to change my inline keybord. The code below shows how I am trying to use this method, but when I tap on keyboard in telegram, it just dissapears:
bot.on('callback_query', msg => {
bot.editMessageReplyMarkup({
reply_markup: {
inline_keyboard: [
[
{
text: "text1",
callback_data: "data1"
}
],
[
{
text: "text2",
callback_data: "data2"
}
]
]
}
}, {
chat_id: msg.from.id,
message_id: msg.message.message_id
});
})
It happens without any errors, I don't undestand why. Any ideas?
The method's discription on GitHub.