Class MenuButton
java.lang.Object
io.github.natanimn.telebof.types.keyboard.MenuButton
- All Implemented Interfaces:
Serializable
This object describes the bot's menu button in a private chat.
- Since:
- 3 March 2025
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetText()getType()OptionalsetWebApp(WebAppInfo webApp) Optional
-
Constructor Details
-
MenuButton
public MenuButton() -
MenuButton
Required- Parameters:
type- Type of the button.
-
-
Method Details
-
setText
Optional- Parameters:
text- Web app text on the button- Returns:
MenuButton
-
setWebApp
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 methodBotContext.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
-
getText
-
getWebApp
-