Telegram Bot API
🌐 Türkçe

setChatMenuButton

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

Botun menü düğmesini ayarlar.

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

Parametreler

ParametreTürZorunluAçıklama
chat_idIntegerİsteğe bağlıSohbet ID'si
menu_buttonMenuButtonİsteğe bağlıJSON MenuButton nesnesi

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/setChatMenuButton"

Python

import requests

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

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/setChatMenuButton`);
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