Skip to content

Commit

Permalink
feat: Steam Discription, #2176
Browse files Browse the repository at this point in the history
  • Loading branch information
CKY- committed Jun 5, 2023
1 parent 477a678 commit 8480141
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/backend/chat/commands/builtin/steam/steam-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ const getSteamGameDetails = async (requestedGame) => {
gameDetails.releaseDate = foundGame.release_date.date;
}

if (foundGame.short_description) {
gameDetails.shortDescription = foundGame.short_description;
}

return gameDetails;
};

Expand Down
5 changes: 3 additions & 2 deletions src/backend/chat/commands/builtin/steam/steam.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const steam = {
outputTemplate: {
type: "string",
title: "Output Template",
tip: "Variables: {gameName}, {price}, {releaseDate}, {metaCriticScore}, {steamUrl}",
tip: "Variables: {gameName}, {price}, {releaseDate}, {metaCriticScore}, {steamUrl}, {steamShortDescription}",
default: `{gameName} (Price: {price} - Released: {releaseDate} - Metacritic: {metaCriticScore}) {steamUrl}`,
useTextArea: true
}
Expand All @@ -49,7 +49,8 @@ const steam = {
.replace("{price}", gameDetails.price || "Unknown")
.replace("{releaseDate}", gameDetails.releaseDate || "Unknown")
.replace("{metaCriticScore}", gameDetails.score || "Unknown")
.replace("{steamUrl}", gameDetails.url);
.replace("{steamUrl}", gameDetails.url)
.replace("{steamShortDescription}", gameDetails.shortDescription || "Unknown");
}
}

Expand Down

0 comments on commit 8480141

Please sign in to comment.