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)
dbots.getBotInfo(botid)
Parameter | Description |
---|---|
botid | The user ID of the bot |
dbots.getBotStats(botid)
Parameter | Description |
---|---|
botid | The user ID of the bot |
dbots.getAllBots()
dbots.postBotStats(stats)
Parameter | Description |
---|---|
botid | The id of the bot |
stats | An object containing the bots statistics |
stats.server_count | The amount of guilds your bot is in |
Returns null
dbots.getUserInfo(userid)
Parameter | Description |
---|---|
userid | The ID of the user |