Available methods

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

parametertyperequireddescription
chat_idnumberoptionalUnique identifier for the target private chat. If not specified, the bot's default menu button will be changed.
menu_buttonMenuButtonoptionalA 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.

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

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