I am trying to send a message every x amount of seconds in a discord.js bot. I know how to do this put the problem I am having is that it is spamming messages even when I have slowmode enabled. How can I fix this?
client.on('message', message => {
if (message.content === '$ww) {
let count = 0;
let ecount = 0;
for(let x = 0; x < 9000; x++) {
message.channel.send(`hy`)
.then(m => {
count++;
})
}
}
});