
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
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.
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
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.