MenuButtonWebApp¶
- class telegram.MenuButtonWebApp(text, web_app, *, api_kwargs=None)[source]¶
Bases:
telegram.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.Returned In
Added in version 20.0.
- Parameters:
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()
ofBot
. Alternatively, at.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.
- web_app[source]¶
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()
ofBot
. Alternatively, at.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.- Type: