diff options
| author | Rapptz <[email protected]> | 2019-08-11 19:17:06 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-08-27 18:41:31 -0400 |
| commit | 078d1d71d8ecd571f92644d58ebf5b0ac9f7a4d4 (patch) | |
| tree | 31839173f61784f353da747cc4be2b8f338e449c /discord/utils.py | |
| parent | Actually add things to the message cache. (diff) | |
| download | discord.py-078d1d71d8ecd571f92644d58ebf5b0ac9f7a4d4.tar.xz discord.py-078d1d71d8ecd571f92644d58ebf5b0ac9f7a4d4.zip | |
Use new rate limit millisecond precision option.
Diffstat (limited to 'discord/utils.py')
| -rw-r--r-- | discord/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/utils.py b/discord/utils.py index d53d751f..8090d4a7 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -304,7 +304,7 @@ def to_json(obj): def _parse_ratelimit_header(request): now = parsedate_to_datetime(request.headers['Date']) - reset = datetime.datetime.fromtimestamp(int(request.headers['X-Ratelimit-Reset']), datetime.timezone.utc) + reset = datetime.datetime.fromtimestamp(float(request.headers['X-Ratelimit-Reset']), datetime.timezone.utc) return (reset - now).total_seconds() async def maybe_coroutine(f, *args, **kwargs): |