diff options
-rw-r--r-- | discord/client.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py index b68edbb..3c15abd 100644 --- a/discord/client.py +++ b/discord/client.py @@ -80,7 +80,6 @@ class Client: rest_client: RESTClient client_cache: ClientCache = ClientCache() - @property async def user(self): """The `discord.user.User` associated with the client.""" data = await self.rest_client.get('/users/@me') @@ -172,6 +171,8 @@ class Client: event = msg['t'] + print(f"{event}") + match(event): case 'READY': self.ready = True @@ -259,7 +260,7 @@ class Client: async def poll_event(self): async for msg in self.gateway: - if msg.type == aiohttp.WSMsgType.TEXT: + if msg.type in (aiohttp.WSMsgType.TEXT, aiohttp.WSMsgType.BINARY): await self.recv(msg.data) elif msg.type == aiohttp.WSMsgType.CLOSED: break |