mirror of
https://github.com/yawaflua/Flask-Discord.git
synced 2026-02-04 18:24:15 +02:00
✔ Raise an instance of the exception class
This commit is contained in:
@@ -161,7 +161,7 @@ class DiscordOAuth2HttpClient(abc.ABC):
|
|||||||
).request(method, route, data, **kwargs) if oauth else requests.request(method, route, data=data, **kwargs)
|
).request(method, route, data, **kwargs) if oauth else requests.request(method, route, data=data, **kwargs)
|
||||||
|
|
||||||
if response.status_code == 401:
|
if response.status_code == 401:
|
||||||
raise exceptions.Unauthorized
|
raise exceptions.Unauthorized()
|
||||||
if response.status_code == 429:
|
if response.status_code == 429:
|
||||||
raise exceptions.RateLimited(response)
|
raise exceptions.RateLimited(response)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user