-
Notifications
You must be signed in to change notification settings - Fork 44
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
player.clan_rank returning NoneType #109
Comments
What happens when you print |
That returns <class 'coc.players.Player'> I'm able to return player.name and other player properties as well |
Can you see if it works if you do the following: import coc
client = coc.login("email", "password")
async def main():
clan = await client.get_clan('#8U9JL80J')
for player in clan.members:
print(type(player.clan_rank))
client.loop.run_until_complete(main())
client.close() |
Looking at the docs, I don't think you need to iterate through Clan.get_detailed_members, instead iterate through Clan.members. The difference is detailed members returns a Player object while members returns a ClanMember object. |
Yeah, just saw that. But it looks like it is intended to return the ClanMember if available but it fails. At least from reading the source. |
Returns ints! Makes sense, thanks for figuring it out |
Awesome! Please keep the issue open so we can fix the bug. |
Issue has been resolved with version v2.1.2 |
Example:
returns
<class 'NoneType'> for every clan member
The text was updated successfully, but these errors were encountered: