Telegram Bot API
🌐 Türkçe

getMyCommands

Kategori: Bot bilgisi · Bot API 10.3 · Resmi dokümantasyon

Botun mevcut komut listesini döndürür.

Dönüş değeri: Başarılı olduğunda Array of BotCommand döndürür.

Parametreler

ParametreTürZorunluAçıklama
scopeBotCommandScopeİsteğe bağlıJSON BotCommandScope nesnesi
language_codeStringİsteğe bağlıDil kodu (IETF etiketi)

Parametre açıklamaları kısa özetlerdir; tam metin için resmi dokümantasyona bakın.

Örnek istek

curl

curl -s "https://api.telegram.org/bot$TOKEN/getMyCommands"

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.get(f"https://api.telegram.org/bot{TOKEN}/getMyCommands", timeout=30)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/getMyCommands`);
console.log(await res.json());

Adım adım rehber: Telegram bot nasıl yapılır? BotFather ile adım adım bot oluşturma