Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram bot inline keyboard via Node.JS

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);
});
like image 898
Saeed Heidarizarei Avatar asked Jun 12 '26 06:06

Saeed Heidarizarei


1 Answers

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"]]
like image 79
Matteo Enna Avatar answered Jun 13 '26 21:06

Matteo Enna



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!