Reputation:
Aim: To message everyone in my discord server, but with some sort of cooldown.
Attempt: Code
message.guild.members.cache.forEach(member => {
setTimeout(function() {
member.send(argresult).then(console.log(greenBright(`DM'd ${member.user.username}#${member.user.discriminator}`))).catch(() => {
console.error(yellow(`Reattempting to DM member ${member.user.username}#${member.user.discriminator}`))
})
}, 4000);
...
I thought that timing out each member would slow it down but it still kept messaging my members very quickly and not between 4 seconds.
Any help would be appreciated :)
Upvotes: 1
Views: 69
Reputation: 88
MassDM Bots are against the Discord ToS and Guildlines due to multiple Reasons.
Upvotes: 1