Browse Source

Propagate Cloudflare 429 HTML text.

pull/2053/head
Rapptz 6 years ago
parent
commit
dea3ba5eb7
  1. 4
      discord/http.py

4
discord/http.py

@ -181,6 +181,10 @@ class HTTPClient:
# we are being rate limited
if r.status == 429:
if not isinstance(data, dict):
# Banned by Cloudflare more than likely.
raise HTTPException(r, data)
fmt = 'We are being rate limited. Retrying in %.2f seconds. Handled under the bucket "%s"'
# sleep a bit

Loading…
Cancel
Save