const Discord = require('discord.js')
const spam = require('spamnya')
let client = new Discord.Client()
client.on('message', (message) => {
//initiate the detector and log the chats with max 50 logged chats
spam.log(message, 50)
if(spam.tooQuick(3, 1000)){
// when someone send 3 chats in less than a second
}
if(spam.sameMessages(3, 60000)){
// when someone send 3 identical chats within a minute
}
})
-
Notifications
You must be signed in to change notification settings - Fork 4
rainqubit/spamnya
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
spam detector for discord.js bots
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published