peyk.platforms.telegram.methods.set_chat_menu_button

async peyk.platforms.telegram.methods.set_chat_menu_button(self, *, chat_id: int | str | None = None, menu_button: MenuButtonCommands | MenuButtonWebApp | MenuButtonDefault | Mapping[str, object] | None = None) bool

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

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

  • menu_button – A JSON-serialized object for the bot’s new menu button. Defaults to MenuButtonDefault.

Returns:

Result returned by Telegram on successful execution.

Return type:

bool