Viewing rate limits

When using @discordjs/core and @discordjs/rest is there any way to see my current limits and how many requests I'm allowed? I know it's handled internally by the library, but I'd like to have that info exposed somewhere
3 Replies
d.js toolkit
d.js toolkit2y 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.
chewie
chewie2y ago
already answered in #djs-help-v14
Leo
LeoOP2y ago
I don't think that's the number I need, where would the rate limiting for channelsAPI be? chewie just told me they're dynamic so not exactly the answer I was looking for I'm just doing some experimenting and need to keep an eye on limits to get an idea of what I can/can't do Handlers work, just need to make em more readable:

console.log(
rest.requestManager.handlers.map((h) => ({
name: h.id,
remaining: h.remaining,
limit: h.limit,
}))
);

console.log(
rest.requestManager.handlers.map((h) => ({
name: h.id,
remaining: h.remaining,
limit: h.limit,
}))
);
Thank you
Want results from more Discord servers?
Add your server