node-telegram-bot-api

Telegram bot inline keyboard via Node.JS

喜你入骨 提交于 2019-12-12 10:19:45
问题 I'm using the node-telegram-bot-api module, How can I make my keyboard to inline Keyboard? This is my code: bot.onText(/^\/start$/, function (msg) { const opts = { reply_to_message_id: msg.message_id, reply_markup: { resize_keyboard: true, one_time_keyboard: true, keyboard: [ ['Level 1'] ] } }; bot.sendMessage(msg.chat.id, "I'm a test robot", opts); }); 回答1: I answered a question similar to this link: How can create menu for telegram bot in bot father? in your case you could use: keyboard: [[