Saeed Heidarizarei
Saeed Heidarizarei

Reputation: 8956

Start Telegram Bot via inline keyboard

How to Start Telegram Bot via inline keyboard?

Code:

bot.onText(/\/start/, async  msg => {
    const opts = {
        reply_markup: {
            inline_keyboard: [
                [{
                    text: `telegram.me/fullmovie_bot?start=${msg.chat.id}`,
                    callback_data: ``
                }]
            ]
        }
    };
await bot.sendMessage(msg.chat.id, `Share and Start my Bot`, opts);
});

With this code nothing happens Photo

Upvotes: 3

Views: 783

Answers (1)

Sean Wei
Sean Wei

Reputation: 8013

You need to use url as parameter, see following instance:

Awesome Telegram Bot

Upvotes: 2

Related Questions