dban.jsdeprecated

DBan is a global banning service for Discord

Usage no npm install needed!

<script type="module">
  import dbanJs from 'https://cdn.skypack.dev/dban.js';
</script>

README

Dban.js

DBan is a global banning service for Discord

Examples: events

to see more events go here [Doc] (http://docs.dban.apiary.io/#)

var Dban = require("dban.js");

Dban.on("welcome", function(data){
   console.log("connected");
});

Examples: function

var Dban = require("dban.js");

Dban.getBans(function(err, bans){
  if(err) return throw err;
  console.log(bans);
});

Functions list

getBans(callbacks)
callbacks:
  err: if an error happen
  bans: return the list of banned users
getUser(userid, callbacks)
userid: the user id to get
callbacks:
  err: if an error happen
  user: return the user
ban(user, token, callbacks)
user: the user oject you can find an example in the doc
token: the token
callbacks:
  err: if an error happen
  user: return the banned user
unban(user, token, callbacks)
user: the user oject you can find an example in the doc
token: the token
callbacks:
  err: if an error happen
  status: (String)