From eb473018d827de774f097c88ab172b607fa7add7 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 6 Oct 2018 01:18:47 +0000 Subject: [PATCH] Add Platforms to ESRB --- commands/search/esrb.js | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/search/esrb.js b/commands/search/esrb.js index c0ef99c5..ecf1114d 100644 --- a/commands/search/esrb.js +++ b/commands/search/esrb.js @@ -37,7 +37,7 @@ module.exports = class ESRBCommand extends Command { const embed = new MessageEmbed() .setColor(0x231F20) .setAuthor('ESRB', 'https://i.imgur.com/dV2BamF.jpg', 'https://www.esrb.org/') - .setTitle(data.title) + .setTitle(`${data.title} (${data.platforms.join(', ')})`) .setDescription(data.summary || 'No summary available.') .setThumbnail(data.image) .addField('❯ Rating', ratings[data.rating], true) @@ -62,6 +62,7 @@ module.exports = class ESRBCommand extends Command { const descriptors = result.find('td[data-title="Content Descriptors"]').first().children().first().text().trim(); return { title: result.find('td[data-title="Title"]').first().text().trim(), + platforms: result.find('td[data-title="Platforms"]').first().text().trim().split(', '), rating: image.match(/(EC|E|E10plus|T|M|AO)\.png/i)[1], descriptors: descriptors.split(', '), summary: result.find('td[style="border-width: 0 3px 0 0; padding: 10px;"]').first().text().trim() || null, diff --git a/package.json b/package.json index 205b2551..368d96ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "92.3.0", + "version": "92.3.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {