getChatMenuButton()
Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton 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 returned. |
returns
usage in yaebal
not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.
import type { GetChatMenuButtonParams, MenuButton } from "@yaebal/types";
await bot.api.call<MenuButton>("getChatMenuButton", {} satisfies GetChatMenuButtonParams);context shortcut
also available as ctx.getChatMenuButton() on
16
context types — see @yaebal/contexts.
/** Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns [MenuButton](https://core.telegram.org/bots/api/#menubutton) on success. */
ctx.getChatMenuButton(params?: Omit<GetChatMenuButtonParams, "chat_id">)official Bot API docs: https://core.telegram.org/bots/api/#getchatmenubutton