
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@devraelfreeze/discordjs-antispam
Advanced tools
A simple module with quick setup and different options to implement anti-spam features in your bot.
This version of the package will only support discord.js v13
To install this module type the following command in your console:
npm i @devraelfreeze/discordjs-antispam
const Discord = require("discord.js");
const client = new Discord.Client({
intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES],
});
const AntiSpam = require("@devraelfreeze/discordjs-antispam");
const antiSpam = new AntiSpam(client , {
customGuildOptions: false, // Use custom Guild Options or not
warnThreshold: 4, // Amount of messages sent in a row that will cause a warning.
muteThreshold: 6, // Amount of messages sent in a row that will cause a mute
kickThreshold: 8, // Amount of messages sent in a row that will cause a kick.
banThreshold: 10, // Amount of messages sent in a row that will cause a ban.
maxInterval: 2000, // Amount of time (in milliseconds) in which messages are considered spam.
warnMessage: "{@user}, Please stop spamming.", // Message that will be sent in chat upon warning a user.
kickMessage: "**{user_tag}** has been kicked for spamming.", // Message that will be sent in chat upon kicking a user.
muteMessage: "**{user_tag}** has been muted for spamming.", // Message that will be sent in chat upon muting a user.
banMessage: "**{user_tag}** has been banned for spamming.", // Message that will be sent in chat upon banning a user.
maxDuplicatesWarning: 6, // Amount of duplicate messages that trigger a warning.
maxDuplicatesMute: 8, // Ammount of duplicate message that trigger a mute.
maxDuplicatesKick: 10, // Amount of duplicate messages that trigger a kick.
maxDuplicatesBan: 12, // Amount of duplicate messages that trigger a ban.
ignoredPermissions: ["ADMINISTRATOR"], // Bypass users with any of these permissions.
ignoreBots: true, // Ignore bot messages.
verbose: true, // Extended Logs from module.
ignoredMembers: [], // Array of User IDs that get ignored.
unMuteTime: 10, // Amount of time (in minutes) a user will be muted for.
removeMessages: true, // If the bot should remove all the spam messages when taking action on a user!
modLogsEnabled: false, // If to enable modlogs
modLogsChannelName: "CHANNEL_ID", // channel ID to send the logs
// And many more options...
});
/** Listeners */
client.on("ready", () => console.log(`Logged in as ${client.user.tag}.`));
client.on("messageCreate", async (message) => {
await antiSpam.message(message);
});
/** Login the bot */
client.login("VERY SECRET TOKEN HERE :)");
const Discord = require("discord.js");
const client = new Discord.Client({
intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES],
});
const AntiSpam = require("@devraelfreeze/discordjs-antispam");
const antiSpam = new AntiSpam(client, {customGuildOptions: true});
/** Listeners */
client.on("ready", () => console.log(`Logged in as ${client.user.tag}.`));
client.on("messageCreate", async (message) => {
/** Custom guild options in Object format. */
const guildOptions = {
customGuildOptions: false, // Use custom Guild Options or not
warnThreshold: 4, // Amount of messages sent in a row that will cause a warning.
muteThreshold: 6, // Amount of messages sent in a row that will cause a mute
kickThreshold: 8, // Amount of messages sent in a row that will cause a kick.
banThreshold: 10, // Amount of messages sent in a row that will cause a ban.
maxInterval: 2000, // Amount of time (in milliseconds) in which messages are considered spam.
warnMessage: "{@user}, Please stop spamming.", // Message that will be sent in chat upon warning a user.
kickMessage: "**{user_tag}** has been kicked for spamming.", // Message that will be sent in chat upon kicking a user.
muteMessage: "**{user_tag}** has been muted for spamming.", // Message that will be sent in chat upon muting a user.
banMessage: "**{user_tag}** has been banned for spamming.", // Message that will be sent in chat upon banning a user.
maxDuplicatesWarning: 6, // Amount of duplicate messages that trigger a warning.
maxDuplicatesMute: 8, // Ammount of duplicate message that trigger a mute.
maxDuplicatesKick: 10, // Amount of duplicate messages that trigger a kick.
maxDuplicatesBan: 12, // Amount of duplicate messages that trigger a ban.
ignoredPermissions: ["ADMINISTRATOR"], // Bypass users with any of these permissions.
ignoreBots: true, // Ignore bot messages.
verbose: true, // Extended Logs from module.
ignoredMembers: [], // Array of User IDs that get ignored.
unMuteTime: 10, // Amount of time (in minutes) a user will be muted for.
removeMessages: true, // If the bot should remove all the spam messages when taking action on a user!
modLogsEnabled: false, // If to enable modlogs
modLogsChannelName: "CHANNEL_ID", // channel ID to send the logs
// And many more options...
};
await antiSpam.message(message, guildOptions);
});
/** Login the bot */
client.login("VERY SECRET TOKEN HERE :)");
Words Filter System
(Can configure the words list to filter)Discord Anti Links System
Anti Links System
(Can configure the links to be checked)Mass Mentions System
Emojis excessifs System
Repetitive text System
Auto Moderation Module
If you have any bugs or trouble setting the module up, feel free to open an issue on Github Repository
Freeze#0123
If you want to use old version, you can use command
npm i @devraelfreeze/discordjs-antispam@<version>
Copyright © 2022 devRael1
This project is MIT licensed.
This is not an official Discord product. It is not affiliated with or endorsed by Discord Inc.
FAQs
Complex Antispam & AutoMod module for Discord JS v13 & v14
The npm package @devraelfreeze/discordjs-antispam receives a total of 0 weekly downloads. As such, @devraelfreeze/discordjs-antispam popularity was classified as not popular.
We found that @devraelfreeze/discordjs-antispam 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.