How can create menu for telegram bot in bot father?
Asked Answered
U

1

8

I'm new in telegram bot and see this bot:
enter image description here
that but when type /start show menu to me and with out type slash to command just fire the menu button,how can i create menu in telegram like that bot?

Upwind answered 31/1, 2017 at 11:15 Comment(1)
That's not something you can do in botfather, you need to do that in your bot's source code. And for us to help you with that, you will need to provide us with an example of your code.Spherule
M
4

You must add the return ajax call a string like this:

'{ "keyboard": [["uno :+1:"],["uno \ud83d\udc4d", "due"],["uno", "due","tre"],["uno", "due","tre","quattro"]]}';

The result is:

enter image description here

Miscellanea answered 31/1, 2017 at 20:57 Comment(2)
How we can return it?Osswald
bot.telegram.sendMessage(ctx.chat.id, 'Main Menu', { reply_markup: { inline_keyboard: [code from sample below - sihould be an array of arrays] } })Distend

© 2022 - 2025 — McMap. All rights reserved.