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

Latest commit

 

History

History
69 lines (62 loc) · 1.35 KB

README.md

File metadata and controls

69 lines (62 loc) · 1.35 KB

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"
    }
]