discord-antispam-js
v1.0.11
Published
This module can detect the spam & you can configure the antispam with the options, enjoy!
Downloads
17
Readme
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"
})
})