if (name is not None and uid is not None) or (name or uid is '') or (name is None and uid is None):
await self.close()
raise TypeError("Exactly one non-empty parameter should be provided (name or uid)")
this because with the previous check if you call auth.get_player(name=''), the condition (name is None) is False, so it continue giving error.
await self.close() #every time raise TypeError get called
just for close the connection before raising to avoid other useless information in traceback.
auth.py
self.total_time_played_hours: int = 0
. . .
. . .
self.total_time_played_hours = self.total_time_played // 3600 if self.total_time_played else 0
Note: i messed the commit comments, hopefully this gets fixed when the pr will be merged :)
player.py:
this because with the previous check if you call auth.get_player(name=''), the condition (name is None) is False, so it continue giving error.
just for close the connection before raising to avoid other useless information in traceback.
auth.py
Note: i messed the commit comments, hopefully this gets fixed when the pr will be merged :)