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 toolkit2y 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/luna2y ago
just check the amount of messages someone sent in a specific timeframe or check if their messages are equal
pup
pupOP2y ago
how would i keep checking if that same user has made multiple messages? is what i dont understand
treble/luna
treble/luna2y ago
store them in a collection
pup
pupOP2y ago
surely i dont have to create some sort of database to log that? so thers no other way
treble/luna
treble/luna2y ago
you can cache them locally
pup
pupOP2y ago
yes thats what i mean alright well
treble/luna
treble/luna2y ago
caching them locally is not a db
pup
pupOP2y ago
well it technically is the way im about to use it
treble/luna
treble/luna2y ago
just store them in a collection
pup
pupOP2y ago
yes ok thank you
treble/luna
treble/luna2y ago
then check on messageCreate if the last message.content is equal to the content of the new message
pup
pupOP2y ago
alright thanks a lot !
treble/luna
treble/luna2y ago
yw
pup
pupOP2y ago
dogeHaHa
Want results from more Discord servers?
Add your server