1.1.4 • Published 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)
Parameter | Description |
---|
botid | The user ID of the bot |
getBotStats
dbots.getBotStats(botid)
Parameter | Description |
---|
botid | The user ID of the bot |
getAllBots
dbots.getAllBots()
postBotStats
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 |
getUserInfo
dbots.getUserInfo(userid)
Parameter | Description |
---|
userid | The ID of the user |