✔ Raise an instance of the exception class

This commit is contained in:
thec0sm0s
2020-09-11 09:55:33 +05:30
parent 72538e5ef3
commit 03eea97a77

View File

@@ -161,7 +161,7 @@ class DiscordOAuth2HttpClient(abc.ABC):
).request(method, route, data, **kwargs) if oauth else requests.request(method, route, data=data, **kwargs)
if response.status_code == 401:
raise exceptions.Unauthorized
raise exceptions.Unauthorized()
if response.status_code == 429:
raise exceptions.RateLimited(response)