Reputation: 23
Before you read the question, I would like to inform you that I'm not intrested in command cooldown thing and this question is not connected to it.
Since my friend server got raided about 30 times last week I stared wondering about writing a bot in js using discord.js v12...
Sorry for over complicating this a little ^-^"
Upvotes: 1
Views: 9348
Reputation: 56
I don't have a turnkey solution for you, but here are some resources to check out that could help you:
Rate limits are dynamic, hence the "rateLimit"
event of the library could be of use to you.
However, I had the notion discord.js
natively handled rate limits by queuing actions accordingly (see here), so I'm unsure you have to handle this by yourself.
By the way, useful resources if you are a beginner with discord.js
: https://discordjs.guide/
PS: You could also step up the verification level of your server. It probably would be both more easy and effective.
Upvotes: 4