From b271f3b37c9a28ba9254f2a24c98cfcd65cb3c24 Mon Sep 17 00:00:00 2001 From: mjk134 <57556877+mjk134@users.noreply.github.com> Date: Mon, 11 Jul 2022 19:56:34 +0000 Subject: chore(client): Change send method of hearbeat + identify --- discord/client.py | 4 ++-- discord/utils/__init__.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/discord/client.py b/discord/client.py index 3384657..d6cfd50 100644 --- a/discord/client.py +++ b/discord/client.py @@ -121,7 +121,7 @@ class Client: "op": 1, "d": None } - await self.gateway.send(json.dumps(heartbeat)) + await self.send(heartbeat) async def identify(self): """ @@ -139,7 +139,7 @@ class Client: } } } - await self.gateway.send(json.dumps(identify)) + await self.send(identify) def event(self, coro: Optional[Callable[..., Coroutine[Any, Any, Any]]]=None, /) -> Optional[Callable[..., Coroutine[Any, Any, Any]]]: """ diff --git a/discord/utils/__init__.py b/discord/utils/__init__.py index 7fdb52b..199f0c8 100644 --- a/discord/utils/__init__.py +++ b/discord/utils/__init__.py @@ -1 +1,3 @@ -from .event_emitter import * \ No newline at end of file +from .event_emitter import * +from .exceptions import * +from .rest import * \ No newline at end of file -- cgit 1.4.1-2-gfad0