Package Exports
- discord-anti-spam
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (discord-anti-spam) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
discord-anti-spam.js
An extremely simple module preventing spam on your discord server.
Installation
This module assumes you already have a basic Discord.js bot setup.
Once you've done this setting the anti spam up will be very easy. And you can follow the code below
var anti_spam = require("discord-anti-spam");
antispam(bot, {
warnBuffer: 3, //Maximum amount of messages allowed to send in the interval time before getting warned.
maxBuffer: 5, // Maximum amount of messages allowed to send in the interval time before getting banned.
interval: 1100, // Amount of time in ms users can send a maximum of the maxBuffer variable before getting banned.
warningMessage: "stop spamming or I'll whack your head off.", // Warning message send to the user indicating they are going to fast.
banMessage: "has been banned for spamming, anyone else?" // Ban message, always tags the banned user in front of it.
});
That's it. enjoy not being raided :)