Available methods

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

parametertyperequireddescription
chat_idnumberoptionalUnique identifier for the target private chat. If not specified, the bot's default menu button will be returned.

returns

MenuButton

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
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.

context shortcut
/** 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">)