MicupList

API Dokümantasyonu

MicupList API'si ile botunun sunucu sayısını gönderebilir, kullanıcıların oy verip vermediğini kontrol edebilir ve oy webhook'ları alabilirsin.

Kimlik doğrulama

Panelindeki bot sayfasından bir API anahtarı oluştur ve her istekte Authorization başlığında gönder.

Authorization: ml_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Temel adres:

https://micuplist.me/api/v1

Hız limiti: IP başına dakikada 60 istek; istatistik gönderimi bot başına dakikada 2 istek.

Uç noktalar

POST/bots/{id}/statsAnahtar gerekli

Botunun sunucu (ve isteğe bağlı shard) sayısını günceller.

{ "serverCount": 1250, "shardCount": 2 }
GET/bots/{id}/check?userId={userId}Anahtar gerekli

Kullanıcının bekleme süresi içinde oy verip vermediğini döner.

{ "voted": true }
GET/bots/{id}/votesAnahtar gerekli

Botuna verilen son 100 oyu döner.

GET/bots/{id}

Onaylı bir botun herkese açık bilgilerini döner.

GET/servers/{id}

Onaylı bir sunucunun herkese açık bilgilerini döner.

Oy webhook'u

Panelde bir webhook adresi ayarlarsan, her oyda bu adrese aşağıdaki gibi bir POST isteği gönderilir. Authorization başlığını webhook sırrınla karşılaştırarak isteği doğrula. Başarısız istekler 3 kez yeniden denenir.

POST https://your-bot.example.com/micuplist
Authorization: <webhook secret>
Content-Type: application/json

{
  "type": "vote",            // "test" when sent from the dashboard
  "botId": "1564535472599334913",
  "userId": "1559444666317799424",
  "isWeekend": false,
  "timestamp": "2026-10-27T12:00:00.000Z"
}

Örnekler

JavaScript

const TOKEN = process.env.MICUPLIST_TOKEN;
const BOT_ID = '<your bot id>';

// Post server count every 30 minutes
setInterval(async () => {
  await fetch('https://micuplist.me/api/v1/bots/' + BOT_ID + '/stats', {
    method: 'POST',
    headers: { Authorization: TOKEN, 'Content-Type': 'application/json' },
    body: JSON.stringify({ serverCount: client.guilds.cache.size }),
  });
}, 30 * 60 * 1000);

// Check whether a user voted
const res = await fetch('https://micuplist.me/api/v1/bots/' + BOT_ID + '/check?userId=' + userId, {
  headers: { Authorization: TOKEN },
});
const { voted } = await res.json();

Python

import os, requests

TOKEN = os.environ["MICUPLIST_TOKEN"]
BOT_ID = "<your bot id>"

requests.post(
    f"https://micuplist.me/api/v1/bots/{BOT_ID}/stats",
    headers={"Authorization": TOKEN},
    json={"serverCount": 1250},
    timeout=10,
)

Hatalar

Hatalar uygun HTTP durum koduyla ve aşağıdaki biçimde döner.

{ "error": "RATE_LIMITED", "resetAt": "2026-10-27T12:01:00.000Z" }