Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-mod

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-mod

Npm to be more faster with the moderation settings

  • 1.0.13
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

⎛ℹ️⎞ About

Fast-mod Package it's a unique package made by Jeotique that allows you to be more faster with the basic moderation functions...


⎜📥⎟ Installation

To install fast-mod package you need:

  • You need to install Node.js.

  • You need a package called discord.js.

  • You need a package called ms to use the bin function.

  • You need a package called pretty-ms to use the bin function.

  • You need a package called quick.db to use the bin function.

Then you can open your application's terminal and type:

$ npm install discord.js
$ npm install ms
$ npm install pretty-ms
$ npm install quick.db
$ npm install fast-mod

⎜➡️⎟ Usage

The available functions are:

  • SetupMute - Create or assign a mute role faster (auto permission).
  • Mute - Fast mute function.
  • Tempmute - Fast tempmute function.
  • Unmute - Fast unmute function.
  • Kick - Fast kick function.
  • Ban - Fast ban function.
  • Unban - Fast unban function.

SetupMute

SetupMute is a fast function to create or assign a muted role with permission.

Example:


//Defining the package
const mod = require('fast-mod')
//The package need quick.db
const db = require('quick.db')

//event message
module.export.run => (client, message) {
        if(!message.member.hasPermission('ADMINISTRATOR')) return message.reply("Permission missing \`ADMINISTRATOR\`") //check if the author have the admin permission
        //check if the server have already a muted role
        let role = db.fetch(`mute_${message.guild.id}`)
        //check if the author give a argument or not
        if(!args[0] && !role) return mod.SetupMute(client, message, 'create')
        //if the author ask to create a role the code will create it automaticly
        if(!role && args[0]=='create') return mod.SetupMute(client, message, 'create')
        //if the server have already a muted role the code will just assign permission
        if(role && !args[0]) return mod.SetupMute(client, message, role)
        //if the author ask for a role id the code will assign the permission if the role exist
        if(role && args[0]) return mod.SetupMute(client, message, args[0])

        /*
        the message need to be like that : 
        prefix+setup  <--- if a role is already assigned if will just re-assign the permission
        prefix+setup create <-- will create a role and assign permission
        prefix+setup @role/id <-- will assign the mentionned role (or id) to the muted role and assign permission
        */
}

Mute

Mute is a fast function to mute a member, work only if the mute role is set on the server.

Example:


//Defining the package
const mod = require('fast-mod')

//event message
module.export.run => (client, message, args) {
        if(!message.member.hasPermission('ADMINISTRATOR')) return message.reply("Permission missing \`ADMINISTRATOR\`") //check if the author have the admin permission
        
        mod.Mute(client, message, args) //call the mute function and all is automatic

        //the message need to be like that : prefix+mute @mention/id
}

Tempmute

Tempmute is a fast function to mute a member during a specific time, work only if the mute role is set on the server.

Example:


//Defining the package
const mod = require('fast-mod')

//event message
module.export.run => (client, message, args) {
        if(!message.member.hasPermission('ADMINISTRATOR')) return message.reply("Permission missing \`ADMINISTRATOR\`") //check if the author have the admin permission
        
        mod.Tempmute(client, message, args) //call the tempmute function and all is automatic

        //the message need to be like that : prefix+tempmute @mention/id 5m     <--- the member mentionned will be muted for 5min, use s for second, h for hour and d for day
}

Unmute

Unmute is a fast function to unmute a member, work only if the mute role is set on the server.

Example:


//Defining the package
const mod = require('fast-mod')

//event message
module.export.run => (client, message, args) {
        if(!message.member.hasPermission('ADMINISTRATOR')) return message.reply("Permission missing \`ADMINISTRATOR\`") //check if the author have the admin permission
        
        mod.Unmute(client, message, args) //call the unmute function and all is automatic

        //the message need to be like that : prefix+unmute @mention/id     <--- the member mentionned will be unmuted
}

Kick

Kick is a fast function to kick a member.

Example:


//Defining the package
const mod = require('fast-mod')

//event message
module.export.run => (client, message, args) {
        if(!message.member.hasPermission('KICK_MEMBERS')) return message.reply("Permission missing \`KICK MEMBERS\`") //check if the author have the ban member permission
        
        mod.Kick(client, message) //call the kick function and all is automatic

        //the message need to be like that : prefix+kick @mention/id     <--- the member mentionned will be kick, if the bot can't he will notice it
}

Ban

Ban is a fast function to ban a member.

Example:


//Defining the package
const mod = require('fast-mod')

//event message
module.export.run => (client, message, args) {
        if(!message.member.hasPermission('BAN_MEMBERS')) return message.reply("Permission missing \`BAN MEMBERS\`") //check if the author have the ban member permission
        
        mod.Ban(client, message) //call the ban function and all is automatic

        //the message need to be like that : prefix+ban @mention/id     <--- the member mentionned will be ban, if the bot can't he will notice it
}

Unban

Unban is a fast function to ban a member.

Example:


//Defining the package
const mod = require('fast-mod')

//event message
module.export.run => (client, message, args) {
        if (!message.member.hasPermission('BAN_MEMBERS')) return message.reply("Permission missing \`BAN MEMBERS\`") //check if the author have the ban member permission

    mod.Unban(client, message, args) //call the unban function and all is automatic

    //the message need to be like that : prefix+unban id     <--- the member mentionned will be unban, if the bot can't he will notice it
}

⎝🔶⎠ Contact us

In case you have idea's to improve the package, or maybe you found some bugs or you need help, you can contact us from our discord server!


Discord support server

Keywords

FAQs

Package last updated on 25 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc