mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Add Platforms to ESRB
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class ESRBCommand extends Command {
|
|||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setColor(0x231F20)
|
.setColor(0x231F20)
|
||||||
.setAuthor('ESRB', 'https://i.imgur.com/dV2BamF.jpg', 'https://www.esrb.org/')
|
.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.')
|
.setDescription(data.summary || 'No summary available.')
|
||||||
.setThumbnail(data.image)
|
.setThumbnail(data.image)
|
||||||
.addField('❯ Rating', ratings[data.rating], true)
|
.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();
|
const descriptors = result.find('td[data-title="Content Descriptors"]').first().children().first().text().trim();
|
||||||
return {
|
return {
|
||||||
title: result.find('td[data-title="Title"]').first().text().trim(),
|
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],
|
rating: image.match(/(EC|E|E10plus|T|M|AO)\.png/i)[1],
|
||||||
descriptors: descriptors.split(', '),
|
descriptors: descriptors.split(', '),
|
||||||
summary: result.find('td[style="border-width: 0 3px 0 0; padding: 10px;"]').first().text().trim() || null,
|
summary: result.find('td[style="border-width: 0 3px 0 0; padding: 10px;"]').first().text().trim() || null,
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "92.3.0",
|
"version": "92.3.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user