0.5.7 • Published 4 years ago

discord-warns v0.5.7

Weekly downloads
195
License
ISC
Repository
-
Last release
4 years ago

Tired of not finding a good warning system? Here you have the solution

Information

Discord Warns is a module that facilitates developers to improve their applications or bots

Dev: Esponjosin

INSTALLATION

To install we simply do

$ npm i discord-warns@latest

NOTE

All npm has been restructured and is now more modular, you can now interact more effectively with the data Update to 0.5.7 mandatory

USE

const Warns = require('discord-warns')

const warns = new Warns({
  dir: __dirname
})

//If it is in discord you can do the warns by server adding an extra parameter called table, example

const warns = new Warns({
  dir: __dirname
  table: <guild>.id
})

Datebase Functions

Create

Create is a function that allows you to create a user's base data if they do not exist

/**
* @param {string} [id] - Id where the data will be stored
*/

warns.create(id)

Get

Get is a function that allows you to get base data from an id

/**
* @param {string} [id] - Id where the data will be get
*/

warns.get(id)

Delete

Delete is a function that deletes the data of an id

/**
* @param {string} [id] - Id where the data will be deleted
*/

warns.delete(id)

All

All is a function that returns an array with all the data stored in the database

warns.all()

Find

Find is a function that allows obtaining data outside the current table, it only works with the unique identifier

/**
* @param {string} [_id] - Unique identifier that is created when data is created
*/

warns.delete(id)

Data Functions

Data is a constructor that is returned when getting / creating data from an id

Add

Add is a function that adds a warning

/**
* @param {string/object} [moderator] - ID of the creator of the notice or User object of discord.js
* @param {string} [reason] - Reason for warning (default: Misbehavior)
*/

<Data>.add(moderator, reason)

Get

Get is a function that allows you to obtain the data of x warn

/**
* @param {string} [id] - Unique creator identifier when adding a warn
*/

<Data>.get(id)

Delete

Delete is a function that allows you to delete a notice using its unique identifier

/**
* @param {string} [id] - Unique creator identifier when adding a warn
*/

<Data>.delete(id)
0.5.7

4 years ago

0.5.6

4 years ago

0.5.5

4 years ago

0.5.0

4 years ago

0.5.1

4 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.5

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago