# xbans

> An JS module for blocking users in Discord Server.

Latest version **1.0.0** (published 2019-05-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install xbans
pnpm add xbans
yarn add xbans
bun add xbans
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-05-02 |
| First published | 2019-05-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | me.sqdsh.top |
| Maintainers | eclipsehub |

## Links

- npm: https://www.npmjs.com/package/xbans
- npm.io page: https://npm.io/package/xbans

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.88.0

## Recent versions

- 1.0.0 (latest) — 2019-05-02

## README

# XBans

Модуль для проверки и блокировки пользователей, которые нарушили что-либо.

  - При заходе пользователя, проверьте, в списке он или нет, ```if(!res.userid) return;```.
  - Если же есть, ```user.ban(`${res.modid} | ${res.reason}`);```.

# Для модераторов
Также, у нас есть модераторы, для которых есть методы ```ban``` и ```unban```.

# Пример
```js
const XBans = require("xbans");
const client = new XBans("<ваш API ключ>"); // API ключ можно запросить через эл. почту: admin@sqdsh.top

// Блокировка
client.ban("<ID нарушителя>").then(o_0 => {
    return <что-нибудь>;
});

// Разблокировка
client.unban("<ID нарушителя>").then(o_0 => {
    return <что-нибудь>;
});

// Проверка на бан
client.checkuser("<ID нарушителя>").then(res => {
    if(!res.userid) return console.error("ERROR | Не находится в базе данных");
    else return <что-нибудь>; // например => user.ban(`${res.modid} | ${res.reason}`); // ID нарушителя | Причина
});
```

---
_Source: https://npm.io/package/xbans · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
