mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-11-25 02:01:28 +00:00
Offline members are now added by default automatically.
This commit adds support for GUILD_MEMBERS_CHUNK which had to be done due to forced large_threshold requirements in the library.
This commit is contained in:
@@ -84,9 +84,10 @@ class Server(Hashable):
|
||||
Check the :func:`on_server_unavailable` and :func:`on_server_available` events.
|
||||
"""
|
||||
|
||||
__slots__ = [ 'afk_timeout', 'afk_channel', '_members', '_channels', 'icon',
|
||||
'name', 'id', 'owner', 'unavailable', 'name', 'me', 'region',
|
||||
'_default_role', '_default_channel', 'roles', '_member_count']
|
||||
__slots__ = ['afk_timeout', 'afk_channel', '_members', '_channels', 'icon',
|
||||
'name', 'id', 'owner', 'unavailable', 'name', 'me', 'region',
|
||||
'_default_role', '_default_channel', 'roles', '_member_count',
|
||||
'large' ]
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self._channels = {}
|
||||
@@ -139,6 +140,7 @@ class Server(Hashable):
|
||||
# according to Stan, this is always available even if the guild is unavailable
|
||||
self._member_count = guild['member_count']
|
||||
self.name = guild.get('name')
|
||||
self.large = guild.get('large', self._member_count > 250)
|
||||
self.region = guild.get('region')
|
||||
try:
|
||||
self.region = ServerRegion(self.region)
|
||||
|
||||
Reference in New Issue
Block a user