Skip to content

Commit

Permalink
Merge pull request #158 from MiscGuild/mojang-ratelimit-workaround
Browse files Browse the repository at this point in the history
fix: added an extra check to work around mojang ratelimit
  • Loading branch information
Amxgh authored Nov 18, 2023
2 parents 7bc7ac1 + f27fff9 commit caeb951
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/request_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ async def get_name_by_uuid(uuid: str):
# Player does not exist
if not resp:
continue

if "name" not in resp:
continue
return resp["name"]
api_key = await get_hyapi_key()
# If the Mojang API fails to return a name, the bot checks using the hypixel API
Expand Down

0 comments on commit caeb951

Please sign in to comment.