This is a module for interacting with Bots For Discord's api.
You must have a bot listed on Bots For Discord, and have an api key to use this module.
examples:
const BFDAPI = require("bfdapi.js");
const bfd = new BFDAPI("client id","api token");
bfd.postServerCount(5).then((res) => console.log(res));
// if successful: { message: 'Server count successfully updated.', success: true }
// if failed, it will throw an error```
### Get a bots votes
```javascript
const BFDAPI = require("bfdapi.js");
const bfd = new BFDAPI("client id","api token");
bfd.getBotVotes().then((res) => console.log(res));
// this will be different quite often
// if successful: { hasVoted: [], hasVoted24: [], votes: 0, votes24: 0, votesMonth: 0}
// if failed, it will throw an error```
### Get Bot
```javascript
const BFDAPI = require("bfdapi.js");
const bfd = new BFDAPI("client id","api token");
bfd.getBot("bot id").then((res) => console.log(res));
// this will be different for every bot
// if successful: <too large to put here>
// if failed, it will throw an error```
### Get User
```javascript
const BFDAPI = require("bfdapi.js");
const bfd = new BFDAPI("client id","api token");
bfd.getUser("user id").then((res) => console.log(res));
// this will be different for every bot
// if successful: <too large to put here>
// if failed, it will throw an error```
### Get User Bots
```javascript
const BFDAPI = require("bfdapi.js");
const bfd = new BFDAPI("client id","api token");
bfd.getBot("bot id").then((res) => console.log(res));
// this will be different for every user
// if successful: array of Bots
// if failed, it will throw an error```
## Get Bot Widget
```javascript
const BFDAPI = require("bfdapi.js");
const bfd = new BFDAPI("client id","api token");
bfd.getBotWidget().then((res) => console.log(res));
// if successful: bot widget string
// if failed, it will throw an error```