From 9bc48b21f5c41d3d618e535a639e6011e039d55e Mon Sep 17 00:00:00 2001 From: orlnub123 <30984274+orlnub123@users.noreply.github.com> Date: Thu, 23 Aug 2018 21:58:25 +0300 Subject: [PATCH] Fix send_as_json not dispatching socket_raw_send --- discord/gateway.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/gateway.py b/discord/gateway.py index a1f77193e..fe3d63c67 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -456,7 +456,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol): async def send_as_json(self, data): try: - await super().send(utils.to_json(data)) + await self.send(utils.to_json(data)) except websockets.exceptions.ConnectionClosed as e: if not self._can_handle_close(e.code): raise ConnectionClosed(e, shard_id=self.shard_id) from e