constDiscord=require('discord.js')constspam=require('spamnya')letclient=newDiscord.Client()client.on('message',(message)=>{//initiate the detector and log the chats with max 50 logged chatsspam.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}})