How could I create a three-dashes menus on a Telegram bot, similarly to what they do to the Jobs bot? It should be similar to this:
How do we call this kind of menu?
2
In java case with this library.
if the commands already was created, so simply in the class that extends TelegramLongPollingBot:
this.execute(new GetMyCommands());
In other case:
Create new List BotCommand
List<> commandsList = new ArrayList();
Adding BotCommand to the list with name and description
commandsList.add(new BotCommand("commandName", "description"));
Create a new SetMyCommands whit the botCommandList and executed
this.execute(new SetMyCommands(commands));
more information about: https://telegram.org/blog/animated-backgrounds#bot-menu
You can add your commands which will be displayed on the menu using the Bot father commands.
I followed the below steps:
Now open your bot and the command you send will be displayed on the Menu.
Hope this helps.
Click here to cancel reply.
2
Answers
In java case with this library.
if the commands already was created, so simply in the class that extends TelegramLongPollingBot:
In other case:
Create new List BotCommand
List<> commandsList = new ArrayList();
Adding BotCommand to the list with name and description
commandsList.add(new BotCommand("commandName", "description"));
Create a new SetMyCommands whit the botCommandList and executed
this.execute(new SetMyCommands(commands));
more information about: https://telegram.org/blog/animated-backgrounds#bot-menu
You can add your commands which will be displayed on the menu using the Bot father commands.
I followed the below steps:
Now open your bot and the command you send will be displayed on the Menu.
Hope this helps.