Skip to content

Commit

Permalink
👀
Browse files Browse the repository at this point in the history
  • Loading branch information
tonkku107 committed Feb 11, 2018
1 parent 35d806f commit 93db542
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ class DBLAPI {
return response.body;
}

async getVotes(onlyids) {
async getVotes(onlyids, days) {
if (!this.token) throw new Error('This function requires a token to be set');
const response = await this._request('get', 'bots/votes', { onlyids }, true);
if (days < 0 || days > 31) throw new Error('Days parameter out of bounds (0-31)');
const response = await this._request('get', 'bots/votes', { onlyids, days }, true);
return response.body;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dblapi.js",
"version": "1.0.0",
"version": "1.1.0",
"description": "A module for interacting with the discordbots.org API",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 93db542

Please sign in to comment.