mirror of
				https://github.com/Rapptz/discord.py.git
				synced 2025-10-25 02:23:04 +00:00 
			
		
		
		
	Propagate Cloudflare 429 HTML text.
This commit is contained in:
		| @@ -181,6 +181,10 @@ class HTTPClient: | |||||||
|  |  | ||||||
|                     # we are being rate limited |                     # we are being rate limited | ||||||
|                     if r.status == 429: |                     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"' |                         fmt = 'We are being rate limited. Retrying in %.2f seconds. Handled under the bucket "%s"' | ||||||
|  |  | ||||||
|                         # sleep a bit |                         # sleep a bit | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user