fix: prevent NoneType closure during guild member check.
fixed a bug (prevented iterating the NoneType)
@@ -292,6 +292,13 @@ class Guild(DictSerializerMixin):
else None
)
if not self.members and self._client:
+
+ if (
+ not len(self._client.cache.self_guilds.view) > 1
+ or not self._client.cache.self_guilds.values[str(self.id)].members
+ ):
+ pass
+ else:
members = self._client.cache.self_guilds.values[str(self.id)].members
if all(isinstance(member, Member) for member in members):
self.members = members
