From 889975133def5292dcbc0135f038985e3dc8f941 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sat, 29 Apr 2017 14:22:12 +0000 Subject: [PATCH] Global Memory in Info --- commands/util/info.js | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/util/info.js b/commands/util/info.js index 72195d69..57b0fbe4 100644 --- a/commands/util/info.js +++ b/commands/util/info.js @@ -22,6 +22,7 @@ module.exports = class InfoCommand extends Command { if (!message.channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return message.say('This Command requires the `Embed Links` Permission.'); const guilds = await this.client.shard.fetchClientValues('guilds.size'); + const memory = await this.client.shard.broadcastEval('Math.round(process.memoryUsage().heapUsed / 1024 / 1024)'); const embed = new RichEmbed() .setColor(0x00AE86) .setFooter(`©2017 dragonfire535 | Version ${version} | Created ${moment.duration(Date.now() - this.client.user.createdTimestamp).format('y[ years], M[ months], w[ weeks, and ]d[ days]')} ago!`) @@ -36,7 +37,7 @@ module.exports = class InfoCommand extends Command { .addField('Source Code', '[View Here](https://github.com/dragonfire535/xiaobot)', true) .addField('Memory Usage', - `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)}MB`, true) + `${Math.round(process.memoryUsage().heapUsed / 1024 / 1024)}MB / ${memory.reduce((prev, val) => prev + val, 0)}MB`, true) .addField('Uptime', moment.duration(this.client.uptime).format('d[d]h[h]m[m]s[s]'), true) .addField('Node Version', diff --git a/package.json b/package.json index bdb07670..936a166e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "16.4.1", + "version": "16.4.2", "description": "A Discord Bot", "main": "shardingmanager.js", "scripts": {