A JavaScript and a Python client, so the whole integration is four lines instead of forty.
Everything on this site is plain HTTP and you never have to install anything. The
libraries exist because four things — the autoposter’s interval, the retry on a
429, the constant-time signature check, and hashing the raw body rather than a
re-serialised one — are the four things hand-written integrations get wrong, and
each of them costs something: a rate limit, a missed vote, or a stranger claiming
rewards.
JavaScript
npm install discordbotlist-sdk — no dependencies, Node 18+.
Python
pip install discordbotlist — async, no hard dependencies.
On npm the package is discordbotlist-sdk, not discordbotlist. That name
belongs to a different site (discordbotlist**.com**) and installing it here
gets you a client for somebody else’s API.
The poster posts once on start and every 30 minutes after that. The floor is five
minutes: the limit is 60 requests a minute and a server count does not move
sixty times a minute.
Sharded bots post the total, not one shard’s slice. A shard posting its own
count makes the listing show whichever shard checked in last — the number then
jumps around and means nothing.
from discordbotlist import parse_webhook@app.post("/webhooks/votes")async def votes(request: Request): vote = parse_webhook( await request.body(), request.headers.get("x-webhook-signature-256"), os.environ["DBL_WEBHOOK_SECRET"], ) if vote is None: return Response(status_code=401) await grant_reward(vote.user_id) return Response(status_code=204)
Both take the raw body. Parsing first and hashing the result is the common
mistake: JSON.parse then JSON.stringify — or json.loads then json.dumps —
produces different bytes, and the HMAC of different bytes never matches.
Nothing here is required. The
API reference is the contract, and the
field names match what every other bot list uses — so a poster library you
already run (blapi and friends) works by adding one host. The
autoposting guide shows that form.
Assistant
Responses are generated using AI and may contain mistakes.