Skip to content

Commit

Permalink
Handle Steam appIds with missing tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanC committed May 19, 2024
1 parent f8a2847 commit fbcda0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion services/steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ def IsUpdated(self: Self, appId: int) -> DiscordEmbed | bool:
)

if (not data) or (data.get("status") != "success"):
return
return False

if not data["data"][str(appId)].get("common"):
logger.warning(f"Failed to fetch Steam app {appId}, no common data")

return False

name: str = data["data"][str(appId)]["common"]["name"]
icon: str = data["data"][str(appId)]["common"]["icon"]
Expand Down

0 comments on commit fbcda0a

Please sign in to comment.