Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Fast-mod Package it's a unique package made by Jeotique that allows you to be more faster with the basic moderation functions...
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
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 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 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 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 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 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 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 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
}
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!
FAQs
Npm to be more faster with the moderation settings
We found that fast-mod demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.