Unique string identifier for the menu.
ReadonlyidUnique string identifier for this menu.
OptionalparentReference to the parent Menu if this instance is a submenu.
Appends a back button that returns to the parent menu.
Button label text (default: "Back").
OptionalonNavigate: MenuNavigationHandler
Optional callback hook executed before navigating back.
This Menu instance for chaining.
Synchronously builds the InlineKeyboardMarkup for this menu.
Optionalctx: CallbackContext<Optional CallbackContext for dynamic label resolution.
Constructed inline keyboard markup.
Creates a MiddlewareFn that automatically intercepts matching callback queries, dispatches button handlers, and performs in-place menu navigation.
A middleware function for use with app.use().
Asynchronously renders the InlineKeyboardMarkup, resolving any async dynamic labels.
Optionalctx: CallbackContext<Optional CallbackContext for dynamic label evaluation.
Resolves with the constructed InlineKeyboardMarkup.
Advances the menu builder to start a new row of buttons.
This Menu instance for chaining.
Appends a navigation button leading to a child Menu.
Static string label or dynamic label function.
The destination submenu to open.
OptionalonNavigate: MenuNavigationHandler
Optional callback hook executed before switching menus.
This Menu instance for chaining.
Appends an interactive callback button with a click handler to the current row.
Static string label or dynamic label function.
Callback function executed when the button is clicked.
This Menu instance for chaining.
Constructs a new Menu instance.