Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit 9f47d7f

Browse files
committed
Fix cases where member_count is equal to 0
Fixes Rapptz#4008, Rapptz#4005
1 parent 540a88b commit 9f47d7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/guild.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def _from_data(self, guild):
257257
# according to Stan, this is always available even if the guild is unavailable
258258
# I don't have this guarantee when someone updates the guild.
259259
member_count = guild.get('member_count', None)
260-
if member_count:
260+
if member_count is not None:
261261
self._member_count = member_count
262262

263263
self.name = guild.get('name')

0 commit comments

Comments
 (0)