mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 21:44:48 +02:00
Steam Improvements
This commit is contained in:
@@ -6,7 +6,7 @@ module.exports = class SteamCommand extends Command {
|
|||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'steam',
|
name: 'steam',
|
||||||
aliases: ['steam-game'],
|
aliases: ['steam-game', 'game', 'video-game'],
|
||||||
group: 'search',
|
group: 'search',
|
||||||
memberName: 'steam',
|
memberName: 'steam',
|
||||||
description: 'Searches Steam for your query.',
|
description: 'Searches Steam for your query.',
|
||||||
@@ -36,9 +36,9 @@ module.exports = class SteamCommand extends Command {
|
|||||||
.get('https://store.steampowered.com/api/appdetails')
|
.get('https://store.steampowered.com/api/appdetails')
|
||||||
.query({ appids: id });
|
.query({ appids: id });
|
||||||
const { data } = body[id.toString()];
|
const { data } = body[id.toString()];
|
||||||
const current = data.price_overview ? data.price_overview.final / 100 : 0;
|
const current = data.price_overview ? `$${data.price_overview.final / 100}` : 'Free';
|
||||||
const original = data.price_overview ? data.price_overview.initial / 100 : 0;
|
const original = data.price_overview ? `$${data.price_overview.initial / 100}` : 'Free';
|
||||||
const price = current === original ? `$${current}` : `~~$${original}~~ $${current}`;
|
const price = current === original ? current : `~~${original}~~ ${current}`;
|
||||||
const platforms = [];
|
const platforms = [];
|
||||||
if (data.platforms) {
|
if (data.platforms) {
|
||||||
if (data.platforms.windows) platforms.push('Windows');
|
if (data.platforms.windows) platforms.push('Windows');
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "60.2.1",
|
"version": "60.2.2",
|
||||||
"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