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

getChatMenuButton is directly typed on Api — call it straight off bot.api.

bot.ts
import type { GetChatMenuButtonParams } from "@yaebal/types";

await bot.api.getChatMenuButton({} satisfies GetChatMenuButtonParams);

context shortcut

also available as ctx.getChatMenuButton() on 17 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">)