Fix Steam

This commit is contained in:
Daniel Odendahl Jr
2018-07-14 23:06:28 +00:00
parent aae147f278
commit cf8d8eef51
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class SteamCommand extends Command {
const { body } = await request
.get('https://store.steampowered.com/api/appdetails')
.query({ appids: id });
const { data } = body[id.toString()];
const { data } = body[id.toString()] || body[id];
const current = data.price_overview ? `$${data.price_overview.final / 100}` : 'Free';
const original = data.price_overview ? `$${data.price_overview.initial / 100}` : 'Free';
const price = current === original ? current : `~~${original}~~ ${current}`;