Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Commit

Permalink
Update mojangapi.py
Browse files Browse the repository at this point in the history
  • Loading branch information
duhby authored Jul 11, 2020
1 parent bbabbd0 commit fd66eb9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions actual files/mojangapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@

def getUUID(user):
try:
response = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{player}",timeout=api_timeout).json()
response = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{user}",timeout=api_timeout).json()
return response["id"]
except:
logging.error("API Timeout! (mojang)")
return None

def correctCaps(user):
try:
response = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{player}",timeout=api_timeout).json()
response = requests.get(f"https://api.mojang.com/users/profiles/minecraft/{user}",timeout=api_timeout).json()
return response["name"]
except:
except Exception as error:
print(error)
logging.error("API Timeout! (mojang)")
return user

0 comments on commit fd66eb9

Please sign in to comment.