Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dblapi.js

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dblapi.js - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

7

index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc