Telegram Bot icon

Telegram Bot

Interact with the Telegram Bot API – send messages, manage chats, handle payments, and more

Actions101

Bot → Set My Commands

AI-generated

Summary

Set the list of commands supported by the Telegram bot for a specified scope and language.

Inputs

  • Commands (JSON) (required) — Provide a JSON array of BotCommand objects, each with a 'command' and 'description' field, e.g. [{"command":"start","description":"Start"}].
  • Scope (JSON) — Define the scope of the bot commands as a JSON object (BotCommandScope) to control where these commands apply.
  • Language Code — Specify a two-letter ISO 639-1 language code to set commands for a particular language.

Output shape

A single JSON object indicating success status of the operation.

The operation returns the Telegram API response for setting bot commands. If successful, the response indicates true. Supports scope and language code for targeted command lists.

Examples

Example 1: Set global commands for the bot

Set Commands (JSON) to [{"command":"start","description":"Start the bot"}, {"command":"help","description":"Get help"}] and leave Scope and Language Code empty.

Links

Discussion