Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
easyantispam
Advanced tools
Easy Anti Spam package used for Discord Bots to prevent invites link from other servers and flooded/duplicated messages.
This package have 2 principal functions:
GitBook Page You can contact us on your Discord server
Using NPM:
npm install easyantispam
Using Yarn (Linux):
yarn add easyantispam
const Discord = require('discord.js');
const client = new Discord.Client();
const EasyAntiSpam = require('easyantispam'); // Js
// TypeScript: import EasyAntiSpam from "easyantispam";
Easy = new EasyAntiSpam.Config({ urls: true, canKick: true, canBan: true, warnRow: 3 }); // And more config variables...
client.once('ready', () => console.log('Bot is online!'));
client.on('message', async message => {
Easy.run(message);
});
client.login('TOKEN_HERE');
The Config is to initialize the Anti Spam system. The run() is placed inside the message event to analyze all received messages.
EasyAntiSpamOptions
- List of options can be found here.message
- The message to be analyzed.Properties marked with ?
are optional. All options are predefined
{
urls?: false, // Delete or not all URLS
discordInvites?: false, // Delete or not Discord Invites
allowUrlImages?: true, // Delete or not Images provided by URL
dm?: false, // If true, send your message with URL to private message
messageLink?: "Hey {author}, you are not allowed to send spam.", // Message sent when a user send an URL
messageFlood?: "Hey {author}, stop doing spam.", // Message sent when a user is warned for flood
messageKicked?: "{author} has been kicked.", // Message sent when a user is kicked
messageBanned?: "{author} has been banned.", // Message sent when a user is banned
allowBots?: true, // Allow bots
allowedPerms?: [], // List of permissions allowed to do spam
warnRow?: 4, // Messages sent in a row to be warned
kickRow?: 6, // Messages sent in a row to be kicked
banRow?: 8, // Messages sent in a row to be banned
rowInterval?: 2000, // Amount of time in ms to consider spam (2s)
warnDuplicates?: 5, // Duplicated messages sent to be warned
kickDuplicates?: 10, // Duplicated messages sent to be kicked
banDuplicates?: 15, // Duplicated messages sent to be banned
duplicatesInterval?: 600000, // Amount of time in ms to consider spam (10m)
canKick?: false, // If false, the bot dont kick users
canBan?: false, // If false, the bot dont ban users
banDays?: 1, // Amount of days of Ban
}
{author}
- Returns a mentioned author of the message.MIT
FAQs
Easy Anti Spam package used for Discord Bots to prevent invites link from other servers and flooded/duplicated messages.
The npm package easyantispam receives a total of 0 weekly downloads. As such, easyantispam popularity was classified as not popular.
We found that easyantispam 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.