0.0.2 • Published 8 years ago
discord-bots-api v0.0.2
dbapi
A wrapper made for the Discord Bots API
Example
var dbapi = require("./discordbots.js/index.js");
var db = new dbapi("Token")
db.getStats("140707547634991104").then((botData) => { console.log(botData) })
NPM Package
https://www.npmjs.com/package/discord-bots-api
Documentation
.bots
db.bots.then((botData) => { console.log(botData) })
Returns all the data added to the API.
.getInfo(botID)
db.getInfo(botID).then((botData) => { console.log(botData) })
Returns information about a bot on the API.
db.getStats(botID).then((botData) => { console.log(botData) })
Returns stats about a bot on the API, returns undefined
if a server count isnt POST
'd to the API.
.getUser(userID)
db.getUser("133483105645232129").then((userData) => { console.log(userData) })
Returns the bots a user owns.
.postStats(botID, server_count)
db.postStats(botID, 1).then((botData) => { console.log(botData) })
Returns undefined. Bot stats were posted.
.postStatsShard(botID, shardID, shard_count, server_count)
db.postStatsShard(botID, 1, 1, 1).then((botData) => { console.log(botData) })
Returns undefined. Bot stats were posted via shard.
How do i get a token?
From here