How to use the hypixel.hypixel.PlayerNotFoundException function in hypixel

To help you get started, we’ve selected a few hypixel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Snuggle / hypixel.py / example.py View on Github external
elif optionInput.lower() == "karma":
            player = hypixel.Player(mahInput)
            player.getJSON()
            karma = player.JSON['player']['karma']
            print(karma)

        elif optionInput.lower() == "twitter":
            player = hypixel.Player(mahInput)
            player.getJSON()
            try:
                social = player.JSON['player']['socialMedia']
                print(social['TWITTER'])
            except KeyError:
                print("This user doesn't have a Twitter account linked.")
    except hypixel.PlayerNotFoundException:
        print("Cannot find player. :/")