discord-botlists.

discord-botlists docs · archived reader

Getting Started

Framework support

discord.js, Eris, Oceanic, anything else, or no framework at all.

The SDK has no framework lock-in. Pass any client object that exposes a guilds collection and it reads server and shard counts automatically. Or skip the client entirely and hand over the numbers yourself.

FrameworkHow to useAuto collection
discord.jsnew Botlists({ client })guilds.cache.size, shard data
Erisnew Botlists({ client })guilds Map size
Oceanicnew Botlists({ client })guilds Map size
Other frameworksnew Botlists({ statsProvider })you provide it
No frameworknew Botlists({ statsProvider }) or explicit statsyou provide it

statsProvider: full control, any framework or none

const lists = new Botlists({
  statsProvider: async () => ({
    serverCount: shardManager.totalGuilds,
    shardCount: shardManager.shardCount,
    shards: shardManager.perShardCounts,
  }),
});

// or per call, no constructor changes
await lists.postStats({ serverCount: myGuildCount });
TipEverything except auto stats collection (webhooks, parser, status checks, posting) never touches your client object - it is plain HTTP and Node builtins.