diff options
Diffstat (limited to 'discord')
| -rw-r--r-- | discord/client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py index 1df0c812..5d29de7e 100644 --- a/discord/client.py +++ b/discord/client.py @@ -93,7 +93,12 @@ class WebSocket(WebSocketBaseClient): def handshake_ok(self): pass + def send(self, payload, binary=False): + self.dispatch('socket_raw_send', payload, binary) + WebSocketBaseClient.send(self, payload, binary) + def received_message(self, msg): + self.dispatch('socket_raw_receive', msg) response = json.loads(str(msg)) log.debug('WebSocket Event: {}'.format(response)) if response.get('op') != 0: |