set_chat_menu_button()

Client.set_chat_menu_button(chat_id: int | str = None, menu_button: MenuButton = None) bool

Change the bot’s menu button in a private chat, or the default menu button.

Usable by Users Bots
Parameters:
  • chat_id (int | str, optional) – Unique identifier (int) or username (str) of the target chat. If not specified, default bot’s menu button will be changed.

  • menu_button (MenuButton, optional) – The new bot’s menu button. Defaults to MenuButtonDefault.