diff options
| author | BeatButton <[email protected]> | 2018-02-11 09:41:18 -0700 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-02-12 00:20:18 -0500 |
| commit | 9d3d8e0f0aacb22b0a7d4984f4ed21537db480f8 (patch) | |
| tree | 61bf6f0ab4cc628755ce6fc706b87e73447c9026 | |
| parent | [commands] Allow builtin unbound method converters (diff) | |
| download | discord.py-9d3d8e0f0aacb22b0a7d4984f4ed21537db480f8.tar.xz discord.py-9d3d8e0f0aacb22b0a7d4984f4ed21537db480f8.zip | |
Fix websockets 4.0 support
| -rw-r--r-- | discord/gateway.py | 8 | ||||
| -rw-r--r-- | requirements.txt | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/discord/gateway.py b/discord/gateway.py index c995ef46..6d535a38 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -516,11 +516,11 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol): yield from self.send_as_json(payload) @asyncio.coroutine - def close_connection(self, force=False): + def close_connection(self, *args, **kwargs): if self._keep_alive: self._keep_alive.stop() - yield from super().close_connection(force=force) + yield from super().close_connection(*args, **kwargs) class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol): """Implements the websocket protocol for handling voice connections. @@ -701,10 +701,10 @@ class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol): raise ConnectionClosed(e, shard_id=None) from e @asyncio.coroutine - def close_connection(self, force=False): + def close_connection(self, *args, **kwargs): if self._keep_alive: self._keep_alive.stop() - yield from super().close_connection(force=force) + yield from super().close_connection(*args, **kwargs) diff --git a/requirements.txt b/requirements.txt index 5a7e43e7..508b44b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ aiohttp>=2.0.0,<2.3.0 -websockets>=3.1,<4.0 +websockets>=4.0,<5.0 |