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
getChatMenuButton is directly typed on Api — call it straight off bot.api.
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.
/** 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