From 7cf32d0316ff38d8da386c31ef7fac739ed31040 Mon Sep 17 00:00:00 2001 From: Dragory Date: Tue, 23 Apr 2019 05:59:46 +0300 Subject: [PATCH] Add shard latency to !ping --- src/plugins/Utility.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/Utility.ts b/src/plugins/Utility.ts index 01ea7f3f..8f83ed28 100644 --- a/src/plugins/Utility.ts +++ b/src/plugins/Utility.ts @@ -685,6 +685,8 @@ export class UtilityPlugin extends ZeppelinPlugin { const lowest = Math.round(Math.min(...times)); const mean = Math.round(times.reduce((t, v) => t + v, 0) / times.length); + const shard = this.bot.shards.get(this.bot.guildShardMap[this.guildId]); + msg.channel.createMessage( trimLines(` **Ping:** @@ -692,6 +694,7 @@ export class UtilityPlugin extends ZeppelinPlugin { Highest: **${highest}ms** Mean: **${mean}ms** Time between ping command and first reply: **${msgToMsgDelay}ms** + Shard latency: **${shard.latency}ms** `), );