diff --git a/configschema.json b/configschema.json index dae2760..d6c728b 100644 --- a/configschema.json +++ b/configschema.json @@ -16,7 +16,8 @@ }, "steamApiKey": { "type": "string", - "description": "Steam API key used to get steam profile pictures (https://steamcommunity.com/dev/apikey)" + "description": "Steam API key used to get steam profile pictures (https://steamcommunity.com/dev/apikey)", + "default": "STEAM-API-KEY" }, "gameSettings": { "type": "object", diff --git a/src/extension/util/steam-api.ts b/src/extension/util/steam-api.ts index a55b2e3..0c87d15 100644 --- a/src/extension/util/steam-api.ts +++ b/src/extension/util/steam-api.ts @@ -17,6 +17,8 @@ export async function getProfilePicture(steamid: string): Promise<{ id: string; return json.response.players.map((player: Record) => { return { id: player.steamid, pfp: player.avatarfull }; }); + } else { + nodecg.log.error('No Steam API Key') } return []; @@ -51,6 +53,8 @@ export async function getProfileData(steamids: string[]): Promise