You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which application or package is this feature request for?
rest
Feature
To help prevent ratelimits and be more safe, discord.js gives you the option to set a ratelimit offset for all routes. But, some routes are heavily used by some bots, perhaps more than other routes, so providing a one size fits all may not be ideal all the time.
For example what if you have a reactions heavy bot, that adds reactions very often, and you want to be more cautious of the frequent reactions your bot is adding and want to avoid 429s, but you don't want it to make other actions slower than preferred, like editing messages.
Ideal solution or implementation
Perhaps the rateLimitOffset option in the client options could optionally be a function, similar to rejectOnRatelimit. This could take in the route, or extra data, whichever works best, and return the number the offset should be in this context.
Alternative solutions or implementations
The alternative is to implement your own external rate limiting, but that can become messy or repetitive depending on the bot.
Other context
No response
The text was updated successfully, but these errors were encountered:
Which application or package is this feature request for?
rest
Feature
To help prevent ratelimits and be more safe, discord.js gives you the option to set a ratelimit offset for all routes. But, some routes are heavily used by some bots, perhaps more than other routes, so providing a one size fits all may not be ideal all the time.
For example what if you have a reactions heavy bot, that adds reactions very often, and you want to be more cautious of the frequent reactions your bot is adding and want to avoid 429s, but you don't want it to make other actions slower than preferred, like editing messages.
Ideal solution or implementation
Perhaps the
rateLimitOffset
option in the client options could optionally be a function, similar torejectOnRatelimit
. This could take in the route, or extra data, whichever works best, and return the number the offset should be in this context.Alternative solutions or implementations
The alternative is to implement your own external rate limiting, but that can become messy or repetitive depending on the bot.
Other context
No response
The text was updated successfully, but these errors were encountered: