Interface Menu

All Known Implementing Classes:
MenuImpl

public sealed interface Menu permits MenuImpl
Basic interface for a Menu. It provides methods to manipulate and retrieve information about the menu.
See Also:
  • Method Details

    • getMenuId

      int getMenuId()
      Returns:
      The ID of the menu.
    • getMenuName

      @Nullable @Nullable String getMenuName()
      Returns:
      The name of the menu, or null if it is not set.
    • getText

      @Nullable @Nullable String getText()
      Returns:
      The text of the menu, or null if it is not set.
    • setText

      @NotNull @NotNull Menu setText(@NotNull @NotNull String text)
      Sets the text of the menu.
      Parameters:
      text - The text to set.
      Returns:
      The Menu instance.
    • addRow

      @NotNull @NotNull Menu addRow(@NotNull @NotNull InlineKeyboardButton... buttons)
      Adds a row of MenuButtons to the menu.
      Parameters:
      buttons - The MenuButtons to add.
      Returns:
      The Menu instance.
    • addRow

      @NotNull @NotNull Menu addRow(@NotNull @NotNull List<InlineKeyboardButton> buttons)
      Adds a row of MenuButtons to the menu.
      Parameters:
      buttons - The list of MenuButtons to add.
      Returns:
      The Menu instance.
    • getKeyboard

      @NotNull @NotNull InlineKeyboardMarkup getKeyboard()
      Returns the keyboard of the menu.
      Returns:
      The keyboard of the menu.