Installing
npm install wbl-api
Usage
a) Properly instantiating a new client.
const WblApi = ;const BotID = "MY_BOTS_USER_ID";const Token = "MY_WBL_API_TOKEN_FOR_MY_BOT"; const WblClient = "id": BotID "token": Token;
b) Posting your server and shard count to the API.
; // Every 20 minutes.
c) Retriving a list of users that upvoted your bot in last 12 to 24 hours.
WblClient;
Documentation
Client(options)
Name | Optional | Type | Description | Default |
---|---|---|---|---|
options.id | No | String | The id of your discord bot. | None |
options.token | No | String | The WBL API authorization token that belongs to your bot. | None |
.postCount(guildCount[, shardCount])
Posts the server count and shard count to our API.
Name | Optional | Type | Description | Default |
---|---|---|---|---|
guildCount | No | String(Number) | The amount of servers your bot is in. | None |
shardCount | Yes | String(Number) | The amount of shards your bot has. | 1 |
Returns Promise<Object>
.getVotes()
Returns an array of user ids that upvoted your bot in last 12 to 24 hours.
Returns Promise<Array<String>>