Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better rate limiting #54

Open
SpaceManiac opened this issue Aug 7, 2016 · 6 comments
Open

Better rate limiting #54

SpaceManiac opened this issue Aug 7, 2016 · 6 comments
Labels

Comments

@SpaceManiac
Copy link
Owner

Discord is pushing for libs to support rate limits natively rather than leaving that responsibility to users, so there needs to be some handling for that: discord/discord-api-docs#108

Hopefully there'll eventually be some way to get this info programatically, but here's the current state of rate limits:

REST:
       bot:msg:dm |  5/5s    | account-wide
   bot:msg:server |  5/5s    | guild-wide
   bot:msg:global | 50/10s   | account-wide except DMs
             dmsg |  5/1s    | guild-wide
            bdmsg |  1/1s    | guild-wide
     guild_member | 10/10s   | guild-wide
guild_member_nick |  1/1s    | guild-wide
       |Username| |  2/3600s | account-wide

WS Send:
|Presence Update| |   5/60s
         |Global| | 120/60s
@ghost
Copy link

ghost commented Aug 12, 2016

"⎛⎝xX_jake_Xx⎠⎞ - Today at 11:03 AM
[...] we are now sending rate limit info in the header responses BEFORE you get rate limited. This should help you build clients that respect rate limits MUCH easier.
[...]
Read the docs here: https://github.com/hammerandchisel/discord-api-docs/blob/fcc3397d07061aa3704d4f4eb72a6b385d601763/docs/topics/RATE_LIMITS.md"

Do you have a WIP of this or any implementation ideas? This should probably be done soon-ish before the lib is de-listed.

@SpaceManiac
Copy link
Owner Author

I have a plan, the new method makes automatically handling the rate limits a lot easier.

@ghost
Copy link

ghost commented Aug 17, 2016

b1nzy - Today at 11:56 AM
I'm giving yall lots of time(edited)
[...] - Today at 11:57 AM
"Lots of time" being how long?
b1nzy - Today at 11:57 AM
Sept 20th
More than a month
[...] - Today at 11:57 AM
so sept 20 is the deadline
b1nzy - Today at 11:57 AM
Yes

(until libs are delisted)

@SpaceManiac
Copy link
Owner Author

Yep, I saw. I started on it yesterday already.

@SpaceManiac
Copy link
Owner Author

First pass is in b71d1e3, but it probably needs a little refinement before this can be closed.

@SpaceManiac
Copy link
Owner Author

The docs have been updated: discord/discord-api-docs#137. discord-rs needs to be updated for these changes.

@SpaceManiac SpaceManiac mentioned this issue Oct 21, 2016
nabijaczleweli added a commit to nabijaczleweli/dishub that referenced this issue Oct 21, 2016
Depend on discord. Depend on chrono

Add Error::LoginFailed()
Add ops::Feed. Add ops::Feed tests

A chunk of functionality depends on
SpaceManiac/discord-rs#54
for discord v0.9.0 to be released
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant