setChatMenuButton()
Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.
parameters
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | optional | Unique identifier for the target private chat. If not specified, the bot's default menu button will be changed. |
menu_button | MenuButton | optional | A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault. |
returns
boolean
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { SetChatMenuButtonParams } from "@yaebal/types";
await bot.api.call<boolean>("setChatMenuButton", {} satisfies SetChatMenuButtonParams);context shortcut
also available as ctx.setChatMenuButton() on
16
context types — see @yaebal/contexts.
/** Use this method to change the bot's menu button in a private chat, or the default menu button. Returns *True* on success. */
ctx.setChatMenuButton(params: Omit<SetChatMenuButtonParams, "chat_id">)official Bot API docs: https://core.telegram.org/bots/api/#setchatmenubutton