August 27, 2026 · The Minely team
How to build a server stats channels bot (member counters)
Stats channels are the billboard every big server has: '1,204 members', '89 online', '12 bots' sitting permanently at the top of the channel list. They update themselves, they make the server look alive, and they are exactly one rate-limit mistake away from a locked channel. Here is the careful version.
What a stats channels bot actually is
A stats channels bot keeps live counters in channel names — members, bots, online, boosts — updating on a schedule that respects Discord's strict rename rate limits, plus goal tracking that celebrates milestones.
How it works under the hood
The bot computes stats from the guild cache (member count, bot count, online estimate) and renames dedicated stat channels on a throttled schedule — channel renames are hard-limited to 2 per 10 minutes per channel, so the updater batches changes and backs off under pressure. Goal tracking watches for milestones (every 100 members) and posts a celebration. Everything is per-guild config with a dry-run preview.
The prompt that builds it
You do not have to write this yourself. A precise description is enough:
a stats bot that keeps member, bot, and online counters in channel names with rate-limit-safe updates and goal celebrations
Name the commands, the permissions, and the exact messages players see. Precision here is what makes the first build land close.
Building it in the right order
- Create the stat channel set and the counter formatter.
- Implement the throttled rename scheduler.
- Add per-stat enable/disable and formats.
- Wire goal tracking with celebrations.
- Add a preview command and rate-limit backoff.
The details that matter in production
In production, the first thing you learn is that the happy path is the easy half. The edges are where the work lives: restarts, protection interactions, full inventories, and players who treat every system like an exploit puzzle. Build for those from day one and the launch weekend is quiet instead of a fire drill.
Storage and cleanup deserve special attention. Write state as it changes rather than on shutdown, clear per-player state on quit and on world change, and make every admin-facing action leave an audit line. The first time something goes wrong, those records are the difference between a two-minute review and an evening of guessing.
Finally, test like a hostile user. Spam-click every GUI, rejoin mid-action, try the command with no permission and with every permission, and run it while the server is under load. The bugs that survive that pass are the ones worth shipping.
Tuning it after the first build
Update every 10 to 15 minutes; fresher than that is fighting the API for nothing. Batch all renames into one scheduler pass so one busy night does not queue forty renames. Celebrate round numbers; they are the milestones members screenshot.
Tips that save you a rebuild
- Respect the 2-renames-per-10-minutes limit or channels get stuck for hours.
- Keep counter text short; long names truncate on mobile.
- Preview formats before enabling; a typo lives on the billboard.
- Log rename failures; rate-limit walls are silent without them.
Questions people ask
Can I count online members?
Yes, with the presence intent — it is approximate and that is fine.
What about boost count and level?
Add them as counters with the same scheduler.
How do I style the names?
Formats are per-stat strings like Members: {count} — emoji welcome.
Try the prompt above on a fresh project. You will see the plan, the code streaming in, and the repair loop finish the job — then a jar to download.
