SDK v0.0.1 Live

Analytics for Discord Bots.

Monitor guild joins, leaves, and bot activity with a single API key. Connect your client, and DStats handles the infrastructure automatically.

Connected Bot

MemeOClock

Online

Total Guilds

12,842

Last Seen

Just now

Guild Joins

+142

Guild Leaves

-12

index.ts
import { Client, GatewayIntentBits } from "discord.js";
import { Stats } from "@dstats/sdk";
import { DiscordJSAdapter } from "@dstats/discord.js";

const client = new Client({
  intents: [GatewayIntentBits.Guilds],
});

new Stats({
  apiKey: process.env.DSTATS_API_KEY!,
  adapter: new DiscordJSAdapter(client),
});

client.login(process.env.DISCORD_BOT_TOKEN);
That's it. DStats automatically tracks guild joins, guild leaves, and bot activity - no additional code required.

Automatic Event Tracking

Guild joins and guild leaves are detected automatically through the adapter. Zero configuration hooks.

API Key

Generate a API key from your dashboard and start tracking bots instantly with unified data.

Developer First

Minimal setup, clean SDK, REST API, and excellent documentation. Future support for webhooks is built in.