node-telegram-bot-api icon indicating copy to clipboard operation
node-telegram-bot-api copied to clipboard

editMessageReplyMarkup ... inline_keyboard is hides

Open flyhippo opened this issue 10 years ago • 0 comments

I want to edit inline_keyboard ... my code:

bot.on('callback_query', function(inline_msg) { var messageChatId = inline_msg.message.chat.id; var mess_id = inline_msg.message.message_id; var query = inline_msg.data; switch (query) { case 'online': var opts = { reply_markup: JSON.stringify({ inline_keyboard: [ [{'text':'Send','callback_data':'send'}, {'text':'Stop','callback_data':'stop'}] ] }) }; bot.editMessageReplyMarkup(opts, {chat_id:messageChatId, message_id:mess_id}); break; case 'offline': bot.sendMessage(messageChatId, 'off'); break; default: bot.sendMessage(messageChatId, 'Unknown command!'); } })

as a result of the inline_keyboard disappears, what am I doing wrong?

flyhippo avatar Aug 09 '16 12:08 flyhippo