mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 01:16:21 +00:00
Add Forbidden and NotFound exceptions.
This commit is contained in:
@ -65,6 +65,21 @@ class HTTPException(DiscordException):
|
||||
|
||||
super().__init__(fmt.format(self.response, message))
|
||||
|
||||
class Forbidden(HTTPException):
|
||||
"""Exception that's thrown for when status code 403 occurs.
|
||||
|
||||
Subclass of :exc:`HTTPException`
|
||||
"""
|
||||
pass
|
||||
|
||||
class NotFound(HTTPException):
|
||||
"""Exception that's thrown for when status code 404 occurs.
|
||||
|
||||
Subclass of :exc:`HTTPException`
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
class InvalidArgument(ClientException):
|
||||
"""Exception that's thrown when an argument to a function
|
||||
is invalid some way (e.g. wrong value or wrong type).
|
||||
|
Reference in New Issue
Block a user