1.2.3 • Published 4 months ago

bfd-api-redux v1.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

Deprecation notice for <1.2.2

IMPORTANT: bfd-api-redux versions 1.2.2 and below are NO LONGER SUPPORTED for interfacing with the Discords.com Bots API.

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.

The current version of the Discords.com Bot API will be depracated upon the release of the BotsV3 runtime (website rewrite). Please keep in mind that any bots using a custom wrapper for the API will need to migrate, the current version if this package will also be deprecated and an update will be required.

Usage

Constructing a new API interface:

var bfd = require('bfd-api-redux');
var api = new bfd('BFD_Token', 'botID');

NOTE: If you do now wish to use callbacks, then all actions must be used inside async functions with an await, for example:

You can easily update your Bot's guild count using this function:

let serverCount = client.guilds.cache.size; 
api.setServers(serverCount)

Examples

Get votes

api.getVotes().then(votes => {
    console.log(votes)
})

// Or, if running inside an async function:

await api.getVotes()

Cheking a vote for one specific user (including structure)

api.checkVote("254287885585350666").then(vote => { //Provide a user id
    console.log(vote) //true or false + vote structure
})

Cheking a vote for one specific user (lightweight structure)

api.checkVoteLight("254287885585350666").then(vote => { //Provide a user id
    console.log(vote) //true or false
})
1.2.3

4 months ago

2.0.0

4 months ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago