diff options
| author | Rapptz <[email protected]> | 2019-11-20 02:30:19 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-11-20 02:30:19 -0500 |
| commit | a6f61dcbdecb4badb47040925f29f157da47bf95 (patch) | |
| tree | eb69d643e9b7e57c76d409cc8b5893bb547cf3bb /discord/webhook.py | |
| parent | Trailing whitespace in documentation. (diff) | |
| download | discord.py-a6f61dcbdecb4badb47040925f29f157da47bf95.tar.xz discord.py-a6f61dcbdecb4badb47040925f29f157da47bf95.zip | |
Fix all deprecation warnings for 3.8
Diffstat (limited to 'discord/webhook.py')
| -rw-r--r-- | discord/webhook.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/webhook.py b/discord/webhook.py index 44ca38fd..971a7ad6 100644 --- a/discord/webhook.py +++ b/discord/webhook.py @@ -201,7 +201,7 @@ class AsyncWebhookAdapter(WebhookAdapter): remaining = r.headers.get('X-Ratelimit-Remaining') if remaining == '0' and r.status != 429: delta = utils._parse_ratelimit_header(r) - await asyncio.sleep(delta, loop=self.loop) + await asyncio.sleep(delta) if 300 > r.status >= 200: return response @@ -209,11 +209,11 @@ class AsyncWebhookAdapter(WebhookAdapter): # we are being rate limited if r.status == 429: retry_after = response['retry_after'] / 1000.0 - await asyncio.sleep(retry_after, loop=self.loop) + await asyncio.sleep(retry_after) continue if r.status in (500, 502): - await asyncio.sleep(1 + tries * 2, loop=self.loop) + await asyncio.sleep(1 + tries * 2) continue if r.status == 403: |