Real-Dev-Squad / discord-slash-commands

MIT License
5 stars 50 forks source link

Decide rate limit based on header during runtime #208

Open joyguptaa opened 6 months ago

joyguptaa commented 6 months ago

Issue Description

In the updated flow of mention-each we have hardcoded the API rate limit to 5. If it gets increased in future we then have to make changes here again. Instead, we can decide the rate limit during runtime by sending out a single message and retrieving the API rate limit from headers.

Expected Behavior

We should decide what the rate limit is during runtime instead of hard coding it. So that in the future if it gets increased, our batch size should also update itself automatically.

Current Behavior

As the batch size is hard coded, it cannot auto-update itself. If the rate limit somehow increases, we need to deploy it again.

Screenshots

image

Reproducibility

Steps to Reproduce

  1. Visit guildRole.ts

Severity/Priority

Additional Information

Checklist