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

Discord: prevent 403s to avoid rate limiting #3316

Open
blueridger opened this issue Feb 3, 2022 · 0 comments
Open

Discord: prevent 403s to avoid rate limiting #3316

blueridger opened this issue Feb 3, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@blueridger
Copy link
Member

blueridger commented Feb 3, 2022

Hitting 403s on the discord API gives your API key a worse reputation, potentially causing worse rate limits. The discord fetcher should be changed to check if the api key has permission to access a channel before fetching from it, and skip that channel proactively if it does not have permission.

https://github.com/sourcecred/sourcecred/blob/main/packages/sourcecred/src/plugins/discord/fetcher.js

https://discord.com/developers/docs/topics/rate-limits#:~:text=IP%20addresses%20that%20make%20too,%2C%20403%2C%20or%20429%20statuses.

@blueridger blueridger added the bug Something isn't working label Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant