mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Remove unbound remnants of Guild._member_count
Since now it's always Optional[int]
This commit is contained in:
parent
03687fb616
commit
9c054e9222
@ -392,7 +392,7 @@ class Guild(Hashable):
|
||||
('name', self.name),
|
||||
('shard_id', self.shard_id),
|
||||
('chunked', self.chunked),
|
||||
('member_count', getattr(self, '_member_count', None)),
|
||||
('member_count', self._member_count),
|
||||
)
|
||||
inner = ' '.join('%s=%r' % t for t in attrs)
|
||||
return f'<Guild {inner}>'
|
||||
@ -567,9 +567,8 @@ class Guild(Hashable):
|
||||
members, which for this library is set to the maximum of 250.
|
||||
"""
|
||||
if self._large is None:
|
||||
try:
|
||||
if self._member_count is not None:
|
||||
return self._member_count >= 250
|
||||
except AttributeError:
|
||||
return len(self._members) >= 250
|
||||
return self._large
|
||||
|
||||
@ -988,7 +987,7 @@ class Guild(Hashable):
|
||||
If this value returns ``False``, then you should request for
|
||||
offline members.
|
||||
"""
|
||||
count = getattr(self, '_member_count', None)
|
||||
count = self._member_count
|
||||
if count is None:
|
||||
return False
|
||||
return count == len(self._members)
|
||||
|
Loading…
x
Reference in New Issue
Block a user