1.1.4 • Published 8 years ago

discordbots v1.1.4

Weekly downloads
12
License
ISC
Repository
github
Last release
8 years ago

DiscordBots

In order to even use the library, you must first get an api token. These can be obtained by going to the API site.


First, you must create an instance of the module by doing this:

const DiscordBots = require('discordbots')
const token = 'API TOKEN'
const dbots = new DiscordBots(token)

getBotInfo

dbots.getBotInfo(botid)
ParameterDescription
botidThe user ID of the bot
Returns {Promise[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)}

getBotStats

dbots.getBotStats(botid)
ParameterDescription
botidThe user ID of the bot
Returns {Promise[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)}

getAllBots

dbots.getAllBots()
Returns {Promise[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)}

postBotStats

dbots.postBotStats(stats)
ParameterDescription
botidThe id of the bot
statsAn object containing the bots statistics
stats.server_countThe amount of guilds your bot is in
Returns {Promise[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)}

getUserInfo

dbots.getUserInfo(userid)
ParameterDescription
useridThe ID of the user
Returns {Promise[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)}