is there a better way than this one to ban an user from all the servers the bot is in without api spamming?
client.guilds.cache.forEach(a => a.members.ban(targetID))
NOTE:
This is against Discord's ToS, and you should not use it.
CODE:
I will still provide code for the sake of knowledge.
You can use setInterval()
to wait an amount of time before banning.
client.guilds.cache.forEach(a => {
setInterval(() => {
a.members.ban(targetID);
}, 2000)
})