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:
  • Constructor Details

    • MenuButton

      public MenuButton()
    • MenuButton

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

    • setText

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

      public MenuButton setWebApp(WebAppInfo webApp)
      Optional
      Parameters:
      webApp - 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
    • getType

      public MenuButtonType getType()
    • getText

      public String getText()
    • getWebApp

      public WebAppInfo getWebApp()