1.0.1 • Published 3 years ago
dbots-unofficial-wrapper v1.0.1
Dbots Unofficial Wrapper
This wrappers allows you to post stats and recieve them. This wrappers is for dbots.co and is not the official wrapper. As soon a new version releases i will update this API. Changes may also include setting your Botlist URL.
WRAPPER VERSION: 1.0.1
DESIGNER FOR DBOTS VERSION: 0.2.0b
Features
- Get any stats from the site.
- Post any guild count to the site.
Installation
Install it: Simply run the following command.
$ npm install dbots-unofficial-wrapper
Get status
const dbots = require(`dbots-unofficial-wrapper`);
dbots.botStatus(`---bot ID---`, (status) => {
console.log(status.general.approvedAt); //Return the date your bot was approved.
console.log(status.general.guildCount); //Might return "null" if you haven't posted your guild count yet.
console.log(status.general.lastVoteAt); //Date your bot was last Voted.
console.log(status.general.totalVotes); //Total amount of votes.
console.log(status.general.voteCount); //vote count
console.log(status.topVoters.userId); //user id of top voter.
console.log(status.topVoters.count); //Amount of votes of the top voter.
console.log(status.recentVotes); //returns array with multiple json with the day and the votes on that day.
console.log(status.votes); //return array of votes.
}
Post Guilds
const dbots = require(`dbots-unofficial-wrapper`);
const botPoster = new dbots.botPost('---your bot id---', '---your api token---')
//get your API token from "https://dbots.co/dashboard/bots/[yourBotId]/api"
botPoster.setGuilds(client.guilds.cache.size);
//will give the API the count of guilds (Change client with bot if you have that as your client variable.)