Class MenuButton

java.lang.Object
io.github.natanimn.telebof.types.keyboard.MenuButton
All Implemented Interfaces:
Serializable

public class MenuButton extends Object implements Serializable
This object describes the bot's menu button in a private chat.
Since:
3 March 2025
See Also:
  • Field Details

  • Constructor Details

    • MenuButton

      public MenuButton(MenuButtonType type)
      Required
      Parameters:
      type - Type of the button.
  • Method Details

    • text

      public MenuButton text(String text)
      Optional
      Parameters:
      text - Web app text on the button
      Returns:
      MenuButton
    • webApp

      public MenuButton webApp(WebAppInfo web_app)
      Optional
      Parameters:
      web_app - Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method BotContext.answerWebAppQuery(String, InlineQueryResult). Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link.
      Returns:
      MenuButton