diff options
| author | cookie <[email protected]> | 2016-06-26 14:43:28 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-06-26 14:47:16 -0400 |
| commit | abf9be5f7db79cbfab6d4502fa15ba72975059dd (patch) | |
| tree | b92dd6c72f00ee84a9ff607daa09a38d022e1dcf /discord/client.py | |
| parent | Document that bot users can't use Client.accept_invite (diff) | |
| download | discord.py-abf9be5f7db79cbfab6d4502fa15ba72975059dd.tar.xz discord.py-abf9be5f7db79cbfab6d4502fa15ba72975059dd.zip | |
Guild Sharding support
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/discord/client.py b/discord/client.py index ebea8ec4..5ab263cd 100644 --- a/discord/client.py +++ b/discord/client.py @@ -101,6 +101,10 @@ class Client: connector : aiohttp.BaseConnector The `connector`_ to use for connection pooling. Useful for proxies, e.g. with a `ProxyConnector`_. + shard_id : Optional[int] + Integer starting at 0 and less than shard_count. + shard_count : Optional[int] + The total number of shards. Attributes ----------- @@ -133,6 +137,8 @@ class Client: self.loop = asyncio.get_event_loop() if loop is None else loop self._listeners = [] self.cache_auth = options.get('cache_auth', True) + self.shard_id = options.get('shard_id') + self.shard_count = options.get('shard_count') max_messages = options.get('max_messages') if max_messages is None or max_messages < 100: |