GyverLibs / FastBot

Многофункциональная быстрая библиотека для Телеграм бота на esp8266/esp32
MIT License
185 stars 31 forks source link

How to change header in inline menu? #62

Closed Voha888 closed 7 months ago

Voha888 commented 9 months ago

I'm currently writing my menu. I may not be attentive. But I can’t find how to change the main message (title) in the inline menu? We first create the menu:

if (msg.text == "/menu") {
    String menu1 = F("Menu 1 \t Menu 2 \t Menu 3 \n Back");
    String call1 = F("menu_1, menu_2, menu_3, back");
    bot.inlineMenuCallback("Menu 0", menu1, call1);
    menuID = bot.lastBotMsg();    // запомнили ID сообщения с меню
  }

Then we can change the menu items:

 if (msg.data == "menu_1") {
    String menu2 = F("Answer 1.1 \t Answer 1.2 \t Answer 1.3 \n Back");
    String call2 = F("answ_1_1, answ_1_2, answ_1_3, back");
    bot.editMenuCallback(menuID, menu2, call2);
    depth = 1;
  }

But I can't figure out how to change the text of "Menu 0"?

If I use the method to edit a message, will the menu continue to appear on the screen? I'll check my guesses, I just want to know if I'm doing something wrong?

GyverLibs commented 7 months ago

There is no method for text and menu editing

Voha888 commented 7 months ago

There is no method for text and menu editing

I created this method https://github.com/GyverLibs/FastBot/pull/66