File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1000,20 +1000,23 @@ async def _parse_ratelimits(
1000
1000
)
1001
1001
1002
1002
body_retry_after = float (body ["retry_after" ])
1003
+ reason = body .get ("message" , "none" )
1003
1004
1004
1005
if body .get ("global" , False ) is True :
1005
1006
_LOGGER .error (
1006
- "rate limited on the global bucket. You should consider lowering the number of requests you make or "
1007
- "contacting Discord to raise this limit. Backing off and retrying request..."
1007
+ "rate limited on the global bucket (reason: '%s'). You should consider lowering the number of requests "
1008
+ "you make or contacting Discord to raise this limit. Backing off and retrying request..." ,
1009
+ reason ,
1008
1010
)
1009
1011
self ._bucket_manager .throttle (body_retry_after )
1010
1012
return 0
1011
1013
1012
1014
_LOGGER .error (
1013
- "rate limited on a %s sub bucket on bucket %s. You should consider lowering the number of requests "
1014
- "you make to '%s'. Backing off and retrying request..." ,
1015
+ "rate limited on a %s sub bucket on bucket %s (reason: '%s') . You should consider lowering the number "
1016
+ "of requests you make to '%s'. Backing off and retrying request..." ,
1015
1017
resp_headers .get (_X_RATELIMIT_SCOPE_HEADER , "route" ),
1016
1018
bucket ,
1019
+ reason ,
1017
1020
compiled_route .route ,
1018
1021
)
1019
1022
You can’t perform that action at this time.
0 commit comments