#how to stop discord.js from enqueuing requests when a rate limit is hit (for emoji creation)
18 messages · Page 1 of 1 (latest)
you can listen to the ratelimited event <Client>.rest.on('rateLimited', rate => { ...
iirc an error isn't shown until you quite literally spam the api
by listening to the rateLimited event to see when your bot receives a rate limit
you can avoid a rate limit by not making requests so often such as implementing a cooldown
there aren't any methods to avoid a rate limit because you can't forcibly ignore them when you're going over the limit
implementing a cooldown is an idea you could consider
how large is your bot? server wise
you're obviously adding a ton of emojis over a short time to receive a rate limit like that.
listen to that event to see if you're actually being rate limited
have you tried listening to the rateLimited event?