Anti spam

how would you go about making an anti spam, so say as if someone was spam messaging how would I log that with my bot?
15 Replies
d.js toolkit
d.js toolkit12mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
treble/luna
treble/luna12mo ago
just check the amount of messages someone sent in a specific timeframe or check if their messages are equal
pup
pup12mo ago
how would i keep checking if that same user has made multiple messages? is what i dont understand
treble/luna
treble/luna12mo ago
store them in a collection
pup
pup12mo ago
surely i dont have to create some sort of database to log that? so thers no other way
treble/luna
treble/luna12mo ago
you can cache them locally
pup
pup12mo ago
yes thats what i mean alright well
treble/luna
treble/luna12mo ago
caching them locally is not a db
pup
pup12mo ago
well it technically is the way im about to use it
treble/luna
treble/luna12mo ago
just store them in a collection
pup
pup12mo ago
yes ok thank you
treble/luna
treble/luna12mo ago
then check on messageCreate if the last message.content is equal to the content of the new message
pup
pup12mo ago
alright thanks a lot !
treble/luna
treble/luna12mo ago
yw
pup
pup12mo ago
dogeHaHa