Snuggle / hypixel.py

🎮 This is a simple, unofficial library for getting values from the public Hypixel-API in Python.
https://pypi.org/project/hypixel
MIT License
32 stars 6 forks source link

Some users have the rank "None" #9

Closed Snuggle closed 6 years ago

Snuggle commented 6 years ago

image

Snuggle commented 6 years ago

Turns out this happened when someone had MVP++ and didn't renew it.

The monthlyPackageRank attribute in Hypixel's API did the following: monthlyPackageRank = "SUPERSTAR" ⮕ monthlyPackageRank = "NONE"

I wasn't aware of this behaviour, but it was a pretty simple fix - just check if a rank location equals "NONE" and if it does, ignore it.