From 7132427aca6a693ed604e2b3288d007a62735c56 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Mon, 10 Apr 2017 20:30:52 +0000 Subject: [PATCH] Fix in Info Command --- commands/botinfo/info.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/botinfo/info.js b/commands/botinfo/info.js index 42368209..3d78fcf2 100644 --- a/commands/botinfo/info.js +++ b/commands/botinfo/info.js @@ -20,7 +20,7 @@ module.exports = class InfoCommand extends commando.Command { key: 'shardID', prompt: 'Which Shard would you like to get data for?', type: 'integer', - default: '' + default: NaN }] }); } @@ -30,8 +30,9 @@ module.exports = class InfoCommand extends commando.Command { if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES'])) return; if (!message.channel.permissionsFor(this.client.user).hasPermission('EMBED_LINKS')) return message.say(':x: Error! I don\'t have the Embed Links Permission!'); } - const shardID = args.shardID || this.client.shard.id; - if (shardID > this.client.options.shardCount - 1 || shardID < 0) { + let shardID = args.shardID + 1 || this.client.shardID + 1; + shardID = shardID - 1; + if (shardID > this.client.options.shardCount + 1 || shardID < 0) { return message.say(':x: Error! Invalid Shard!'); } const memory = await this.client.shard.broadcastEval('Math.round(process.memoryUsage().heapUsed / 1024 / 1024)');