Gateway Rate Limits

Similar to the HTTP API, Discord has a Gateway rate limit (https://discord.com/developers/docs/topics/gateway#rate-limiting), with a maximum of 120 commands per 60 seconds. Discord.js handles rate limits for HTTP requests, does it handle Gateway rate limits as well, or must this be handled manually?
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
3 Replies
d.js toolkit
d.js toolkit14mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Syjalo
Syjalo14mo ago
Yes, it handles
nick.
nick.14mo ago
It was in relation to request guild members, in the context of imagining a lazy-loading system to lower memory usage. I’m trying to avoid downloading the entire member list of every server to minimize memory usage, and this has been successful so far. There are some instances where I need to check data for multiple guild members, in bulk, in multiple servers, so without having the entire member list downloaded that would mean a lot of request guild members calls. I’m still on the fence about if this is a good idea or not, or if it would be better to incur the higher memory usage of downloading the entire member list instead