imp
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
discord/http.py
|
|
@ -394,7 +394,7 @@ class Ratelimit: |
|
|
|
def update(self, response: aiohttp.ClientResponse, data: Union[Dict[str, Any], str]) -> bool: |
|
|
|
limit = int(response.headers['X-Ratelimit-Limit']) |
|
|
|
reset_at = self.http.loop.time() + (float(response.headers['X-Ratelimit-Reset']) - time.time()) |
|
|
|
|
|
|
|
|
|
|
|
# Shared scope (which only appears on 429s) could have a longer "reset_at". |
|
|
|
if response.headers.get('X-RateLimit-Scope') == 'shared': |
|
|
|
reset_at = max(reset_at, self.http.loop.time() + data['retry_after']) # type: ignore |
|
|
|