server_count,
with a bare token in the Authorization header — so a library that already
posts to several lists can add this one as configuration rather than as code.
With a poster library
Without one
Six lines, and nothing to keep updated:Sharding
Post the total, not the shard’s slice. Each shard posting its own count makes the number jump around as the shards check in, and the last one to post wins. Withdiscord.js:
How often
Every 15 to 30 minutes is plenty. Two things make a tighter interval pointless rather than harmful:- Re-posting the same number is cheap on our side. The page cache is only invalidated when the value actually changes, so an unchanged post costs one write and nothing else.
- The check-in timestamp moves every time regardless. It is the honest liveness signal on your listing, and it does not need a 30-second loop to stay true.
The count is not guessed from Discord. There is no documented endpoint for
another application’s guild count, so before this API existed the number was
typed in by hand. Posting it is the only way your page shows a real one.