Fix cases where member_count is equal to 0

Fixes #4008, #4005
This commit is contained in:
Rapptz 2020-04-16 23:30:59 -04:00
parent 540a88b762
commit 9f47d7f71c

View File

@ -257,7 +257,7 @@ class Guild(Hashable):
# according to Stan, this is always available even if the guild is unavailable
# I don't have this guarantee when someone updates the guild.
member_count = guild.get('member_count', None)
if member_count:
if member_count is not None:
self._member_count = member_count
self.name = guild.get('name')