Options
All
  • Public
  • Public/Protected
  • All
Menu

dbots.gg

Discord.Bots.Gg Unofficial NPM Package

downloadsBadge versionBadge

Installation

npm i dbots.gg

Introduction

The base client is discord.bot.gg Api, and it takes your discord.bots.gg token and provides you with plenty of methods to interact with the API.

Your discord.bots.gg token can be found at https://discord.bots.gg/docs and copying the token.

Links

Documentation API Reference | GitHub | NPM

Examples

Posting stats:

const Discord = require("discord.js");
const DBGG = require("dbots.gg");

const client = new Discord.Client();
const Api = new DBGG.Api(client, 'Your discord.bots.gg token');

client.on("ready", async () => {
    await Api.post({
        guildCount: client.guilds.cache.size,
        shardCount: 1
    }, true); //Change it by false if you want no messages in console
})

client.login("Your discord bot token");

With this code your bot guilds and shards count will be posted on discord.bots.gg

Get Stats:

await Api.get("123456789123456789");
// =>
{
  guildCount: 25162,
  shardCount: 1,
  //and other data
}

With this code you can get data from a Discord bot ID

Generated using TypeDoc