New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: _member_count in Guild #6652
Comments
Are you sure the guild is not unavailable? Most of the attributes cannot be accessed for unavailable guilds. |
|
The code I'm using only looks at guilds in the current shard. Here's a bit more context for that traceback: guilds = [guild for guild in self.guilds if guild.shard_id == shard_id]
guild_count = len(guilds)
member_count = sum(guild.member_count for guild in guilds) |
Summary
Guild._member_count is sometimes unset
Reproduction Steps
I'm summing my guilds' member count in on_shard_ready. My bot got disconnected from the internet, and after I got a new DHCP lease, I got this exception
Minimal Reproducible Code
Expected Results
Member count is printed after a reconnect
Actual Results
Intents
guilds, messages, guild_reactions, emojis
System Information
Checklist
I have searched the open issues for duplicates.
I have shown the entire traceback, if possible.
I have removed my token from display, if visible.
I'm not sure if the reconnect is related to this issue, but I haven't gotten it on a "cold' boot. Apparently this is supposed to be fixed by 9f47d7f.
The text was updated successfully, but these errors were encountered: