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.

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.