TopStats for Discord bots
Discord bot analytics, from the people who built bots.topstats.gg.
TopStats started as a Discord bot statistics platform - bots.topstats.gg has tracked growth, votes and rankings for tens of thousands of bots listed on top.gg for over six years. This is the same team’s answer to the next question: what is happening inside your bot?
Attach the discord.js integration with one line and guild joins and leaves, slash command usage, shard health, and errors stream into live dashboards - no tracking code of your own. Nothing content-shaped is ever collected: no message text, no command options.
Tracked automatically
guild_joined / guild_leftgrowth and churn as it happens
command_usedper-command usage, with the user as a stable actor
bot_statsperiodic guild count, user estimates, shard latency
bot_erroruncaught errors with their names, never stack contents
One line on your client
- npm install @topstats/discord
- Attach it to your discord.js client with your API key.
- Custom events any time with track().
import { topstats } from '@topstats/discord'
const analytics = topstats(client, { apiKey: process.env.TOPSTATS_API_KEY })
analytics.track('premium_activated', { tier: 'gold' })Common questions
Does it read message content?
No. Nothing content-shaped is collected - no message text and no command options. Message counting exists but is off unless you turn it on, and even then only counts.
How is this different from bots.topstats.gg?
bots.topstats.gg tracks public top.gg statistics for every listed bot - votes, rank history, guild counts. This integration tracks your own bot’s internal product analytics, privately, in your own workspace. They pair well.
Does it work with sharding?
Yes - each shard reports through the same buffered client, and shard id rides along on stats events so per-shard health is chartable.