Skip to navigation

Sync your bot's server count

Beta
Post your bot's guild count to FluxerList on a schedule so the number on your listing stays honest.
View as Markdown

Bot cards show how many servers a bot is in, when the developer chooses to share it. This guide keeps that number current from your bot’s own code.

You’ll need an API key from the bot’s owner or from a developer listed on the bot. Co-developers can use their own keys.

The endpoint

POST https://fluxerlist.com/api/v1/bots/{id}/stats

{id} can be your bot’s Fluxer bot ID, its FluxerList UUID, or its listing slug. The body is a single field.

{ "serverCount": 12345 }

serverCount must be a non-negative integer, no higher than 2,000,000. Once a bot is above 100 servers, a single update can’t be more than 10 times the previous count. Big jumps that are allowed (such as doubling, or first passing 1,000 servers) may be flagged for a quiet manual review; your listing keeps showing the new number meanwhile. On success you get the stored value back. Full details are in the API reference.

Post on a schedule

Post every 30 minutes or so. Posting on every guild join and leave adds requests without making the number meaningfully more accurate, and this endpoint is capped at 12 requests/hour per key (see Rate limits).

const ENDPOINT = `https://fluxerlist.com/api/v1/bots/${process.env.BOT_ID}/stats`;
async function postServerCount(serverCount) {
const res = await fetch(ENDPOINT, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FLUXERLIST_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ serverCount }),
});
if (!res.ok) {
const { error } = await res.json().catch(() => ({}));
console.error(`FluxerList stats failed (${res.status}): ${error}`);
}
}
// `guilds` is however your bot library exposes its server list
setInterval(() => postServerCount(guilds.size), 30 * 60 * 1000);
postServerCount(guilds.size);

Troubleshooting

The key isn’t tied to the bot’s owner or a listed developer. Use the owner’s key, or ask the owner to add you as a co-developer on the listing. Bots can have up to 5.

Double-check the ID. It should match the bot’s Fluxer bot ID, FluxerList UUID, or listing slug.

serverCount must be a whole number of 0 or more, at most 2,000,000, and not more than 10 times the previous count for bots above 100 servers. Strings such as "12345" are rejected, so send a number.

You hit the 12 requests/hour limit or the monthly cap. Wait for the Retry-After header, in seconds.

FluxerList may be having problems. Check the status page. Your scheduled post will retry on its own next time, so there’s no need to retry in a tight loop.

The listing only shows a server count if you’ve chosen to share it. Check your bot’s edit page.