Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.
/ dbans Public archive

An API to communicate with bans.discordlist.net

License

Notifications You must be signed in to change notification settings

motoenduroboy/dbans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DBans Build Status

An API to communicate with bans.discord.id (Unoffical)

Install

npm install dbans

Usage

Check a user

let DBans = require('dbans');
DBans = new DBans('YOUR TOKEN');

DBans.check("USERID").then(ban => {
  //INSERT YOUR CODE HERE
}).catch(err => {
  console.error(err);
});

Return Object

Example If banned:

{
    "banned": "1",
    "user_id": "412811483630534657",
    "case_id": "21861",
    "reason": "Dbans Api test account",
    "proof": "https://imgur.com/a/Sw04K"
}

If not banned it will return

{
    "user_id": "279866000533618689",
    "banned": "0"
}

Check multiple users

let DBans = require('dbans');
DBans = new DBans('YOUR TOKEN');

DBans.checkUsers(["412811483630534657", "279866000533618689"]).then(bans => {
  //INSERT YOUR CODE HERE
}).catch(err => {
  console.error(err);
});

Return Object

[
    {
        "banned": "1",
        "user_id": "412811483630534657",
        "case_id": "21861",
        "reason": "Dbans Api test account",
        "proof": "https://imgur.com/a/Sw04K"
    },
    {
        "user_id": "279866000533618689",
        "banned": "0"
    }
]

About

An API to communicate with bans.discordlist.net

Resources

License

Stars

Watchers

Forks

Packages

No packages published