getMyCommands()
Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.
parameters
| parameter | type | required | description |
|---|---|---|---|
scope | BotCommandScope | optional | A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault. |
language_code | string | optional | A two-letter ISO 639-1 language code or an empty string |
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 { BotCommand, GetMyCommandsParams } from "@yaebal/types";
await bot.api.call<BotCommand[]>("getMyCommands", {} satisfies GetMyCommandsParams);official Bot API docs: https://core.telegram.org/bots/api/#getmycommands