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

discordblacklist

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discordblacklist

A nodejs package that facilitates getting banned Discord users from DiscordBans

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

discordblacklist

A nodejs package that facilitates getting banned Discord users from DiscordBans

Installing via NPM.

$ npm install discordblacklist

Setup and functions.

Creating the object:

const Blacklist = require('discordblacklist'),
banlist = new Blacklist('token');

Get a token here

To update the ban list: banlist.update();

This returns promise, and you can get the ban list from it with either the thenable or banlist.list.

It is recommended you update your ban list every two hours

You can have the blacklist autoupdate the list like so:

const banlist = new Blacklist('token', true, 2*60);

To specify your own auto-update interval, create your object like so:

new Blacklist('token', true, minutes);

Clearing and resetting your auto-updater

To clear the autoupdater simply call banlist.stopUpdateTimer();. To then set a new one do banlist.setUpdateTimer(minutes).

Looking up users.

banlist.lookup("id") where id is the userid of the user you want to check. This returns a boolean depending on if the user is on the ban list.

Changing token

If for whatever reason you would like to switch tokens mid-execution, you can do that easily by calling banlist.changeToken('newtoken');

Keywords

FAQs

Package last updated on 17 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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