Skip to content

Any way to self-throttle downloading? #1034

Answered by Tyrrrz
toydotgame asked this question in Q&A
Discussion options

You must be logged in to vote

It's based on response headers:

// If this was the last request available before hitting the rate limit,
// wait out the reset time so that future requests can succeed.
// This may add an unnecessary delay in case the user doesn't intend to
// make any more requests, but implementing a smarter solution would
// require properly keeping track of Discord's global/per-route/per-resource
// rate limits and that's just way too much effort.
// https://discord.com/developers/docs/topics/rate-limits
var remainingRequestCount = response
.Headers
.T…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@toydotgame
Comment options

@Tyrrrz
Comment options

Answer selected by toydotgame
@toydotgame
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants