Skip to content

bernkastel02/dbapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.


.getStats(botID)

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published