From f2caea154885bf013f5a43852a787d2e25e6e797 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Jun 2020 17:04:56 -0400 Subject: [PATCH] Export Readable Command Leaderboard --- package.json | 2 +- structures/Client.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 67e70d1c..0a33801a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "116.2.4", + "version": "116.2.5", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { diff --git a/structures/Client.js b/structures/Client.js index 7208bcc3..2d9af0ae 100644 --- a/structures/Client.js +++ b/structures/Client.js @@ -56,13 +56,13 @@ module.exports = class XiaoClient extends CommandoClient { } exportCommandLeaderboard() { - let text = '{'; + let text = '{\n'; for (const command of this.registry.commands.values()) { if (command.uses === undefined) continue; - text += `"${command.name}":${command.uses},`; + text += `\n "${command.name}":${command.uses},`; } text = text.slice(0, -1); - text += '}'; + text += '\n}\n'; const buf = Buffer.from(text); fs.writeFileSync(path.join(__dirname, '..', 'command-leaderboard.json'), buf, { encoding: 'utf8'