Telegram bot inline keyboard via Node.JS

11,242

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: [["uno :+1:"],["uno \ud83d\udc4d", "due"],["uno", "due","tre"],["uno", "due","tre","quattro"]]
Share:
11,242
Saeed Heidarizarei
Author by

Saeed Heidarizarei

Hellow My Name Is ė‚Žėī드, Running Node.Js on Android ðŸ‘Ī I Fall in Love ├ HyperText Markup Language (HTML) ├ Cascading Style Sheets (CSS) ├ Hypertext Preprocessor (PHP) ├ JavaScript ├ React/React Native └ Node.js Thank you stackoverflow,

Updated on August 07, 2022

Comments

  • Saeed Heidarizarei
    Saeed Heidarizarei almost 2 years

    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);
    });