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

Checking rate limit headers #271

Open
EEDiscordiaBot opened this issue Nov 1, 2020 · 4 comments
Open

Checking rate limit headers #271

EEDiscordiaBot opened this issue Nov 1, 2020 · 4 comments
Milestone

Comments

@EEDiscordiaBot
Copy link

It'd be helpful to have a built-in method for checking rate limits via Discord's HTTP Headers: https://discord.com/developers/docs/topics/rate-limits#header-format.

@SinisterRectus SinisterRectus modified the milestone: 3.0 Nov 1, 2020
@EEDiscordiaBot
Copy link
Author

If you decide to go through with it, I'd be happy to try my hand at it.

@SinisterRectus
Copy link
Owner

I'm finally getting 3.0 finished in the next month or so. In the current code, I have an httpRequest event that is emitted for the client after every request, but I'm going to have to rework it because it gives users the raw request tables before or while they are used internally, which isn't great for two reasons: 1) I'm trying to avoid using raw tables where ever possible and 2) if the user edits those tables, they may affect the request. I'll have to think about this one when I revisit event payloads.

@SinisterRectus
Copy link
Owner

I've removed the httpRequest event until further notice.

@Mehgugs
Copy link
Contributor

Mehgugs commented Aug 1, 2021

You could potentially have a place in the client where the information is kept -- on request via a client option -- so that people can check the information. Of these headers i think limit (the number of requests left before you need to wait) is probably the most important/interesting to end users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants