Available methods

setMyCommands()

Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success.

parameters

parametertyperequireddescription
commandsBotCommand[]requiredA JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
scopeBotCommandScopeoptionalA JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
language_codestringoptionalA two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands.

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 { SetMyCommandsParams } from "@yaebal/types";

await bot.api.call<boolean>("setMyCommands", {
  commands: [],
} satisfies SetMyCommandsParams);