npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

discord-warns

v0.5.7

Published

A module to facilitate the warning systems with your bot

Downloads

20

Readme

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)