Telegram Bot API
🌐 Bahasa Indonesia

setChatStickerSet

Kategori: Chat · Bot API 10.3 · Dokumentasi resmi

Mengatur set stiker untuk supergrup.

Nilai kembalian: Jika berhasil, mengembalikan True.

Parameter

ParameterTipeWajibDeskripsi
chat_idInteger or StringYaID chat atau @username
sticker_set_nameStringYaNama set stiker

Deskripsi parameter berupa ringkasan singkat; lihat dokumentasi resmi untuk teks lengkapnya.

Contoh permintaan

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/setChatStickerSet" \
  -H "Content-Type: application/json" \
  -d '{"chat_id":123456789,"sticker_set_name":"example"}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/setChatStickerSet",
    json={
        "chat_id": 123456789,
        "sticker_set_name": "example"
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/setChatStickerSet`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "chat_id": 123456789,
    "sticker_set_name": "example"
  }),
});
console.log(await res.json());

Panduan langkah demi langkah: Cara Membuat Bot Telegram: dari BotFather sampai Pesan Pertama