Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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. :/")