Any way to access rate header information? #2369
-
Hi! I am trying to update a channel topic at as regular of an interval as Discord will allow. The topic needs to be updated with the most current data, so for this use case, I can't use JDA's default rate limit handling strategy. For example, if Discord says to retry in 60 seconds, then I'd like to be able to retry in 60 seconds with an updated request, not a replay of the same one. Additionally, I'm hoping to be able to get the information in the Is there any way to do this without manually constructing HTTP requests? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
JDA already does this automatically, it rarely hits rate-limits (unless they are unavoidable). If it does hit the rate-limit, it tells you in the logs and also tells you how long it will wait for. You can see the rate-limit details in the trace logs for RateLimiter. However, your described situation is considered API abuse and will likely get you API banned for spamming. The rate-limit for updating channel topics and names is 10 minutes, and I would advise you not to try and spam it with updates. |
Beta Was this translation helpful? Give feedback.
JDA already does this automatically, it rarely hits rate-limits (unless they are unavoidable). If it does hit the rate-limit, it tells you in the logs and also tells you how long it will wait for.
You can see the rate-limit details in the trace logs for RateLimiter. However, your described situation is considered API abuse and will likely get you API banned for spamming. The rate-limit for updating channel topics and names is 10 minutes, and I would advise you not to try and spam it with updates.