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

zipher

v1.0.0

Published

Un NPM fácil de configurar en español que te ayuda a integrar la función anti-spam en tu bot de Discord.

Downloads

15

Readme

Anti-Spam (2020.2.22-antispam)

Opciones

warnThreshold: Cantidad de mensajes enviados que provocará una advertencia.
kickThreshold: Cantidad de mensajes enviados que provocará una expulsión.
banThreshold: Cantidad de mensajes enviados que provocará un baneo.
maxInterval: Cantidad de tiempo (en milisegundos) en que los mensajes se consideran spam.
warnMessage: Mensaje que se enviará en el chat al advertir a un usuario.
kickMessage: Mensaje que se enviará en el chat al expulsar a un usuario.
banMessage: Mensaje que se enviará en el chat al banear a un usuario.
errorMessages: Permitir los mensajes de error al no poder kickear/banear a un usuario.
kickErrorMessage: Mensaje que se enviará en el chat al no poder kickear a un usuario.
banErrorMessage: Mensaje que se enviará en el chat al no poder banear a un usuario.
maxDuplicatesWarning: Cantidad de mensajes duplicados que desencadenan una advertencia.
maxDuplicatesKick: Cantidad de mensajes duplicados que desencadenan una expulsión.
maxDuplicatesBan: Cantidad de mensajes duplicados que desencadenan un baneo.
deleteMessagesAfterBanForPastDays: Días donde los mensajes serán borrados cuando se banee a un usuario.
exemptPermissions: Ignorar a los usuarios que tengan dichos permisos. (true/false)
ignoreBots: Ignorar bots (true/false)
verbose: Logear acciones el la consola. (true/false)
ignoredUsers: Ignorar usuarios (deben ser IDs)
ignoredRoles: Ignorar roles (deben ser IDs)
ignoredGuilds: Ignorar servidores (deben ser IDs)
ignoredChannels: Ignorar chanales (deben ser IDs)
warnEnabled: Permitir que el bot avise a los usuarios. (true/false)
kickEnabled: Permitir que el bot expulse a los usuarios. (true/false)
banEnabled: Permitir que el bot banee a los usuarios. (true/false)

Ejemplo

const AntiSpam = require('zipher');
const antiSpam = new AntiSpam({
    warnThreshold: 3,
    kickThreshold: 5,
    banThreshold: 7,
    maxInterval: 3000,
    warnMessage: 'Por favor {@user}, para de spamear',
    kickMessage: '**{user_tag}** fue expulsado por spamear',
    banMessage: '**{user_tag}** fue baneado por spamear',
    errorMessages: true,
    kickErrorMessage: "No puedo expulsar a **{user_tag}**",
    banErrorMessage: "No puedo banear a **{user_tag}**",
    maxDuplicatesWarning: 7,
    maxDuplicatesKick: 10,
    maxDuplicatesBan: 10,
    deleteMessagesAfterBanForPastDays: 7,
    exemptPermissions: ["ADMINISTRATOR"],
    ignoreBots: false,
    verbose: false,
    debug: false,
    ignoredUsers: [],
    ignoredRoles: [],
    ignoredGuilds: [],
    ignoredChannels: [],
    warnEnabled: true,
    kickEnabled: true,
    banEnabled: true
});

client.on('message', (message) => antiSpam.message(message));

Eventos que emite:

antiSpam.on("banAdd", (member) => console.log(`${member.user.tag} fue baneado.`));

antiSpam.on("kickAdd", (member) => console.log(`${member.user.tag} fue expulsado.`));

antiSpam.on("spamThresholdWarn", (member) => console.log(`${member.user.tag} alcanzó la cantidad de mensajes enviados que provoca una advertencia.`));

antiSpam.on("spamThresholdKick", (member) => console.log(`${member.user.tag} alcanzó la cantidad de mensajes enviados que provoca una expulsión.`));

antiSpam.on("spamThresholdBan", (member) => console.log(`${member.user.tag} alcanzó la cantidad de mensajes enviados que provoca un baneo.`));

antiSpam.on("error", (message, error, type) => {
	console.log(`${message.author.tag} no puede recibir la sanción '${type}', error: ${error}`);
});