Returns: bool

class aiogram.methods.set_chat_menu_button.SetChatMenuButton(*, chat_id: int | None = None, menu_button: MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault | None = None, **extra_data: Any)[source]#

Use this method to change the bot’s menu button in a private chat, or the default menu button. Returns True on success.


chat_id: int | None#

Unique identifier for the target private chat. If not specified, default bot’s menu button will be changed

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

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

menu_button: MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault | None#

A JSON-serialized object for the bot’s new menu button. Defaults to aiogram.types.menu_button_default.MenuButtonDefault


As bot method#

result: bool = await bot.set_chat_menu_button(...)

Method as object#


  • from aiogram.methods.set_chat_menu_button import SetChatMenuButton

  • alias: from aiogram.methods import SetChatMenuButton

With specific bot#

result: bool = await bot(SetChatMenuButton(...))

As reply into Webhook in handler#

return SetChatMenuButton(...)