{"repo":"EdJoPaTo/grammy-inline-menu","free":true,"listed":false,"github":"https://github.com/EdJoPaTo/grammy-inline-menu","clone":"git clone https://github.com/EdJoPaTo/grammy-inline-menu.git","description":"Inline Menus for Telegram made simple. Successor of telegraf-inline-menu.","language":"TypeScript","stars":382,"topics":["telegram-bot"],"license":"MIT","category":"workflow-automation","readme_excerpt":"grammY Inline Menu This menu library is made to easily create an inline menu for your Telegram bot. Installation Consider using TypeScript with this library as it helps with finding some common mistakes faster. A good starting point for TypeScript and Telegram bots might be this repo: EdJoPaTo/telegram-typescript-bot-template Examples Basic Example More interesting one Look at the TypeScript code here. Version migration Migrate from version 6 to 7 Version 7 switches from Telegraf to grammY as a Telegram Bot framework. grammY has various benefits over Telegraf as Telegraf is quite old and grammY learned a lot from its mistakes and shortcomings. Migrate from version 8 to 9 Version 9 moves MenuTemplate arguments into the options object. This results in shorter lines and easier code readability. It also allows to inline methods easier. How does it work Telegrams inline keyboards have buttons. These buttons have a text and callback data. When a button is hit, the callback data is sent to the bot. You know this from grammY as bot.callbackQuery . This library both creates the buttons and listens for callback data events. When a button is pressed and its callback data is occurring the function relevant to the button is executed. In order to handle tree like menu structures with submenus the buttons itself use a tree like structure to differentiate between the buttons. Imagine it as the file structure on a PC. The main menu uses / as callback data. A button in the main menu will use /","default_branch":null,"files":null,"tree":[],"storefront":"/r/EdJoPaTo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/EdJoPaTo/grammy-inline-menu/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}