Comparing version 1.1.1 to 1.2.0
@@ -114,3 +114,3 @@ const snekfetch = require('snekfetch'); | ||
* @param {boolean} onlyids boolean indicating if this request should only return IDs. | ||
* @param {number} days a number indicating how much days ago the votes should be shown. | ||
* @param {number} days a number indicating how many days ago the votes should be shown. | ||
* @returns {Promise<Buffer>} | ||
@@ -128,7 +128,8 @@ */ | ||
* @param {string} id The ID of the user to check for. | ||
* @param {number} days a number indicating how many days ago the vote should have been made. | ||
* @returns {Promise<boolean>} | ||
*/ | ||
async hasVoted(id) { | ||
async hasVoted(id, days) { | ||
if (!this.token) throw new Error('This function requires a token to be set'); | ||
const voters = await this.getVotes(true); | ||
const voters = await this.getVotes(true, days); | ||
return voters.includes(id); | ||
@@ -135,0 +136,0 @@ } |
{ | ||
"name": "dblapi.js", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "An official module for interacting with the discordbots.org API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24367
362