Git Product home page Git Product logo

discordblacklist's Introduction


NPM version NPM downloads Build Status Dependencies Known Vulnerabilities Paypal

Discordblacklist

The Featured Nodejs package that facilitates getting banned Discord users from DiscordBans.

Installing via NPM.

$ npm install --save [email protected] --only=production

Note: Version 3.2.x package API has changed from previous versions, all previous versions below 3.x are deprecated following a rewrite of the discordbans api as well as changed domains and removed features.

Version 3.2.x now allows you to bulk lookup more than 99 users at once.

Why discordblacklist?

• Fast, Light, and No bloat (Yes! Actually works with No other dependencies!), packed size is ~15kB

• Updated and Modern (Code standards and checks ensure code quality and aim for 0 vulnerabilities)

• Popular and Safe - the Oldest and Most Trusted Full-Coverage package with thousands of downloads, actively maintained by a verified DBans staff member.

I'm sold! How do I begin?

// Create the object
const Blacklist = require('discordblacklist');
const token = 'My-token';
const blacklist = new Blacklist(token);

// Someone's id to test
const someID = '1234567890';

// Raw data from the banlist
let data = await blacklist.lookup(someID);
console.log(data);
// No await:
blacklist.lookup(someID).then(result => console.log(result));

// Boolean they are on the banlist:
let onTheList = await blacklist.isBanned(someID);
console.log(onTheList);
// No await:
blacklist.isBanned(someID).then(result => console.log(result));

// Bulk lookup several users (no maximum user count to lookup at once!)
const ids = ['12345', '123456', '1234567'];
data = await blacklist.bulkLookup(ids);
// No await:
blacklist.bulkLookup(ids).then(result => console.log(result));

// Bulk lookup, but get the results mapped by user_id
const mapdata = await bulkLookupMap(ids);

Changing token

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

This work is ©Copyright under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3. See LICENSE for more details.

Enjoy this package? Consider starring on github and checking out some of my other work:

Youtube Search API

Fluent Filepaths

Urban Dictionary

Contact William Zhou#0001 via https://discord.gg/jj5FzF7 for more information.

discordblacklist's People

Contributors

ethothemodder avatar kometh0616 avatar wzhouwzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.