skip to Main Content

how can I add Menu button in telegram bot using telegraf

menu button like this
Menu

2

Answers


  1. Chosen as BEST ANSWER

    I create a menu button by add a new framework " Grammy "

    first install grammy : npm install grammy

    seconde add this code :

    const { Bot } = require("grammy");
    const bot = new Bot(BOT_TOKEN); // <-- place your bot token in this string
    

    create list of commands :

    bot.api.setMyCommands([
    { command: "start", description: "إبدأ من جديد" },
    { command: "help", description: "طلب مساعدة " },
    { command: "list", description: "القائمة " },
    ]);
    

  2. You can achieve this in two ways. Either by

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search