Telegram Bot icon

Telegram Bot

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

Actions101

Bot → Get My Commands

AI-generated

Summary

Retrieve the bot's currently configured commands.

Inputs

  • scope — JSON object describing the scope of bot commands (BotCommandScope)
  • language_code — Two-letter ISO 639-1 language code

Output shape

array of BotCommand objects

Each object contains command and description fields; may be empty; results reflect the optional scope and language_code.

Examples

Example 1: Fetch all commands with default settings

Leave scope and language_code empty; returns the full command list.

Example 2: Retrieve commands in a specific language

Set language_code to 'de' (or another code); returns localized commands.

Example 3: Get commands for a specific scope

Define a scope JSON (e.g., {"type":"default"}) to filter commands accordingly.

Links

Discussion