Socket
Book a DemoInstallSign in
Socket

discord-addon

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-addon

A addon for a discord bot made in discord.js

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

discord-addon

An extremely simple module to make things simpler.

NOTE: More modules will be added soon!

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 to get started!

const { AntiSpam } = require("discord-addon");

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: 1000, // 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.
  maxDuplicatesWarning: 7,// Maximum amount of duplicate messages a user can send in a timespan before getting warned
  maxDuplicatesBan: 10, // Maximum amount of duplicate messages a user can send in a timespan before getting banned
  softban: false // After a ban, the user gets an unban if this option is true
});

That's it. enjoy not being raided :)

If you have any issues, bugs or trouble setting the module up. feel free to open an issue on Github

Keywords

discord

FAQs

Package last updated on 13 Feb 2018

Did you know?

Socket

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.

Install

Related posts