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

Adds a util function to schedule and execute discord requests according to its rate limits #165

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

Ajeyakrishna-k
Copy link
Contributor

@Ajeyakrishna-k Ajeyakrishna-k commented Dec 4, 2023

Date: 8th December 2023
Developer Name: @Ajeyakrishna-k


Issue Ticket Number

Description

Discord provides rate limit headers like rate limit remaining and time after which rate limit resets, this can be used to schedule request to avoid being rate limited. This PR adds a generic method which can be used to request and schedule any discord end point which provides rate limit headers

Documentation Updated?

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Tested in Staging?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Test Coverage

Screenshot 2023-12-08 at 3 10 47 AM

src/utils/batchDiscordRequests.ts Show resolved Hide resolved
src/utils/batchDiscordRequests.ts Show resolved Hide resolved
src/utils/batchDiscordRequests.ts Show resolved Hide resolved
@iamitprakash iamitprakash merged commit 6ea6973 into develop Dec 12, 2023
2 checks passed
@iamitprakash iamitprakash deleted the feat/bulk-update-user-roles branch December 12, 2023 21:37
@Ajeyakrishna-k Ajeyakrishna-k mentioned this pull request Dec 17, 2023
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants