Here's the Official module of Capehost | DiscordBotReviews Bot List API in JavaScript.
Using npm
npm i dbrapi
Using yarn
yarn add dbrapi
- .postStats()
- .getWidget()
Methods usage:
const DBRAPI = require('dbrapi');
const dbr = new DBRAPI('BOT_ID','API_KEY');
- .postStats()
dbr.postStats('SERVER_COUNT')
.then(console.log);
- .getWidget()
dbr.getWidget('BOT_ID')
.then(console.log);
/*
* name BotListAPI (DBRAPI)
* author ᴮᵉᵗᵗᵉʳ ᴼᶠᶠ ᴳᵒⁿᵉ#0869
* version 1.1.6
* description: Custom BotListAPI For Capehost | DBR
* information: This is an example usage.
*/
const DBR = require('dbrapi');
module.exports = (client) => {
const dbr = new DBR(client.user.id, client.botlist.dbr.token);
dbr.postStats(client.guilds.size).then(() => {
console.log();
}).catch((err) => {
console.log();
});
};