Class MenuImpl

java.lang.Object
org.teleight.teleightbots.menu.MenuImpl
All Implemented Interfaces:
Menu

public final class MenuImpl extends Object implements Menu
  • Constructor Details

    • MenuImpl

      public MenuImpl(@Nullable @Nullable String menuName)
  • Method Details

    • addRow

      @NotNull public @NotNull Menu addRow(@NotNull @NotNull InlineKeyboardButton... buttons)
      Description copied from interface: Menu
      Adds a row of MenuButtons to the menu.
      Specified by:
      addRow in interface Menu
      Parameters:
      buttons - The MenuButtons to add.
      Returns:
      The Menu instance.
    • addRow

      @NotNull public @NotNull Menu addRow(@NotNull @NotNull List<InlineKeyboardButton> buttons)
      Description copied from interface: Menu
      Adds a row of MenuButtons to the menu.
      Specified by:
      addRow in interface Menu
      Parameters:
      buttons - The list of MenuButtons to add.
      Returns:
      The Menu instance.
    • getMenuId

      public int getMenuId()
      Specified by:
      getMenuId in interface Menu
      Returns:
      The ID of the menu.
    • getMenuName

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

      @NotNull public @NotNull String getText()
      Specified by:
      getText in interface Menu
      Returns:
      The text of the menu, or null if it is not set.
    • setText

      @NotNull public @NotNull Menu setText(@NotNull @NotNull String text)
      Description copied from interface: Menu
      Sets the text of the menu.
      Specified by:
      setText in interface Menu
      Parameters:
      text - The text to set.
      Returns:
      The Menu instance.
    • getKeyboard

      @NotNull public @NotNull InlineKeyboardMarkup getKeyboard()
      Description copied from interface: Menu
      Returns the keyboard of the menu.
      Specified by:
      getKeyboard in interface Menu
      Returns:
      The keyboard of the menu.
    • createKeyboard

      @Internal public void createKeyboard()