telegram.MenuButtonWebApp
- class telegram.MenuButtonWebApp(text, web_app, **_kwargs)
Bases:
MenuButton
Represents a menu button, which launches a Web App.
Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their
type
,text
andweb_app
are equal.New in version 13.12.
- Parameters:
text (
str
) – Text of the button.web_app (
telegram.WebAppInfo
) – 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 methodanswerWebAppQuery()
.
- type
telegram.constants.MENU_BUTTON_WEB_APP
.- Type:
str
- text
Text of the button.
- Type:
str
- web_app
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
answerWebAppQuery()
.- Type:
- classmethod de_json(data, bot)
- to_dict()