aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/discord/client.py b/discord/client.py
index 31b2a5a1..23907574 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -125,7 +125,11 @@ class Client:
proxy_auth = options.pop('proxy_auth', None)
self.http = HTTPClient(connector, proxy=proxy, proxy_auth=proxy_auth, loop=self.loop)
- self._connection = ConnectionState(dispatch=self.dispatch, chunker=self._chunker,
+ self._handlers = {
+ 'ready': self._handle_ready
+ }
+
+ self._connection = ConnectionState(dispatch=self.dispatch, chunker=self._chunker, handlers=self._handlers,
syncer=self._syncer, http=self.http, loop=self.loop, **options)
self._connection.shard_count = self.shard_count
@@ -262,13 +266,6 @@ class Client:
del listeners[idx]
try:
- actual_handler = getattr(self, handler)
- except AttributeError:
- pass
- else:
- actual_handler(*args, **kwargs)
-
- try:
coro = getattr(self, method)
except AttributeError:
pass