NOTICE & INFO
bfd-api-redux
is an official bot-page API wrapper for Discords.com (formerly botsfordiscord.com). Please direct all inqueries and support requests to our support server.
Usage
Constructing a new API interface:
var bfd = require('bfd-api-redux');
var api = new bfd('BFD_Token', 'botID');
NOTE: Everything has to be used inside async functions with an await
, for example:
async function user() {
console.log(await api.getUser('254287885585350666'));
}
user();
All of the following functions only require id
, which is the ID of the bot/user that is being searched and return a JSON object when done:
api.getUser('254287885585350666')
api.getUserBots('254287885585350666')
api.getBot('621352902656524288')
api.getWidget('621352902656524288')
api.getVotes()
You can easily update your Bot's guild count using this function:
let serverCount = client.guilds.cache.size;
api.setServers(serverCount)
Examples
Get votes
With callback
api.getVotes().then(votes => {
console.log(votes)
})
Without callback
async function votes() {
console.log(await api.getVotes());
}
votes();