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

ayoub-toxic

v1.0.0

Published

A simple module based on MirageZoe's module: better-discord-antispam.js! While containing the same efficiency(quick and simple setup), it comes with new things like setting up a report channel, timed mutes(added mute & unmute automatically) and many more

Downloads

4

Readme

mute-ayoub.js

A simple module based on MirageZoe's module: better-discord-antispam.js! While containing the same efficiency(quick and simple setup), it comes with new things like setting up a report channel, timed mutes(added mute & unmute automatically) and many more features coming on the way! DISCLAMER: You can only setup 1 set of configuration per client. (That means that you can't configure settings for each server for now. You can only modify in which guild checker is run and in which checker is not run.)

How to add this to your node_modules:

To install this module type in your console command below:

npm i mute-ayoub

An example of how to set up:

Below you will find an example that would explain everything and what you must set up! (it's not too different!)

const Discord = require('discord.js');
const antispam = require('mute-ayoub'); // Requiring this module.
const client = new Discord.Client();

client.on('ready', () => {
  // Module Configuration Constructor
   ayoub(client, {
       mutecmd: "", // The mute command. If there is no command set, by default.
        muteMessage: "was muted since we don't like too much advertisement type people!",
		mutedRole: "muted", // Here you put the name of the role that should not let people write or anything else in your server. If there is no role set, by default, the module will attempt to create the role for you & set it correctly for every channel in your server. It will be named "muted".
		timeMuted: "10m", // This is how much time member X will be muted. if not set, default would be 10 min.
        logChannel: "mute-logs" // This is the channel where every report about spamming goes to. If it's not set up, it will attempt to create the channel.
        mprefix: "#" //the prefix of the mute command. If there is no command set, by default.
      });
      
  // Rest of your code
});

client.on('message', msg => {
  client.emit('checkMessage', msg);
  // Rest of your code
}

client.login('token');

This is the main setup you have to add in order to mute annoying people.

Little bit of documentation...

ayoub(<Client>);

This will configure module to run on its default configuration. <Client> - Variable that defines new Discord.Client() ayoub - Variable that defines require('mute-ayoub')

client.emit('checkMessage', <Message>)

<Message> - Variable that defines the message itself. (client.on('message', async (msg) =>{}) in this situation msg is the variable.) This will basically send your message to module. In fact is REQUIERED for module to run.

ayoub(client, {
    mutecmd: "mute",
    muteMessage: "",
	mutedRole:"",
	timeMuted: "10m",
	logChannel: "",
    mprefix: "#"
});

ayoub - Variable that defines require('mute-ayoub') <Client> - Requiered, Discord.Client muteMessage - Optional, Type: String, Minimum 5 Characters mutedRole- Optional, Type: String timeMuted- Optional, Type: Integer logChannel- Optional, Type: String mprefix- Optional, Type: String mutecmd- Optional, Type: String NOTE: The module will throw errors for assigning incorect types to configuration values.

P.S: If you have any issues, bugs or trouble setting the module up. feel free to open an issue on Github