Skip to content

setCommands

Function · TDLib 1.8.67 · d1085f9c

Sets the list of commands supported by the bot for the given user scope and language; for bots only

setCommands(
  scope: BotCommandScope,
  language_code: string,
  commands: list of BotCommand
) → Ok

scope

BotCommandScope

The scope to which the commands are relevant; pass null to change commands in the default bot command scope

language_code

string

A two-letter ISO 639-1 language code. If empty, the commands will be applied to all users from the given scope, for which language there are no dedicated commands

commands

list of BotCommand

List of the bot's commands