MenuButton

class aiogram.types.menu_button.MenuButton(*, type: str, text: str | None = None, web_app: WebAppInfo | None = None, **extra_data: Any)[source]

This object describes the bot’s menu button in a private chat. It should be one of

If a menu button other than aiogram.types.menu_button_default.MenuButtonDefault is set for a private chat, then it is applied in the chat. Otherwise the default menu button is applied. By default, the menu button opens the list of bot commands.

Source: https://core.telegram.org/bots/api#menubutton

type: str

Type of the button

text: str | None

Optional. Text on the button

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_post_init(context: Any, /) None

We need to both initialize private attributes and call the user-defined model_post_init method.

web_app: WebAppInfo | None

Optional. 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 aiogram.methods.answer_web_app_query.AnswerWebAppQuery. 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.