1client.on("message", (message) => {
2//let's use something like a spam variable for 10 or more messages sent within 5000ms
3if(message.content === spam) {
4 message.reply("Warning: Spamming in this channel is forbidden.");
5 console.log(message.author.username + " (" + message.author.id + ") has sent 10 messages or more in 5 seconds in " + message.channel.name + ".");
6 }
7});
8