mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Begin working on gateway v4 support.
Bump websockets requirement to v3.1 Should be squashed...
This commit is contained in:
@ -101,3 +101,21 @@ class LoginFailure(ClientException):
|
||||
failure.
|
||||
"""
|
||||
pass
|
||||
|
||||
class ConnectionClosed(ClientException):
|
||||
"""Exception that's thrown when the gateway connection is
|
||||
closed for reasons that could not be handled internally.
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
code : int
|
||||
The close code of the websocket.
|
||||
reason : str
|
||||
The reason provided for the closure.
|
||||
"""
|
||||
def __init__(self, original):
|
||||
# This exception is just the same exception except
|
||||
# reconfigured to subclass ClientException for users
|
||||
self.code = original.code
|
||||
self.reason = original.reason
|
||||
super().__init__(str(original))
|
||||
|
Reference in New Issue
Block a user