discord-antispam-js

1.0.11 • Public • Published
const {Client} = require('discord.js')
const client = new Client({intents: 32767})
const db = require('quick.db')
const { antispam } = require('discord-antispam-js')

client.login("ur token here") // your discord token


client.on("messageCreate", async message => {
    antispam(message, 3, 6, "kick", [], options = { 
        // client = your discord client, message = discord message, 3 = the number of message until the alert for spamming, 6 = the number of message for the punish, "kick" = the sanction, it can be "ban", [] the empty array will be the member who can bypass the antispam, and the options that you can see
            alertmessage: "[member] please, stop spamming.", // there is more variable for the member like [memberusertag], [memberid], [memberuserusername]
            kickmessage: "[member] has been kicked for `spamming`",
            banmessage: "[member] has been banned for `spamming`",
            kickerrormessage: "[member] can't be kicked",
            banerrormessage: "[member] can't be banned",
            timeoutmessage: "[member] has been timeout for `spamming`",
            timeouterrormessage: "[member] can't be timeout"
    })
})

Readme

Keywords

none

Package Sidebar

Install

npm i discord-antispam-js

Weekly Downloads

12

Version

1.0.11

License

ISC

Unpacked Size

9.61 kB

Total Files

3

Last publish

Collaborators

  • 999.frost