3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Add shard latency to !ping

This commit is contained in:
Dragory 2019-04-23 05:59:46 +03:00
parent 50c3c92c01
commit 7cf32d0316

View file

@ -685,6 +685,8 @@ export class UtilityPlugin extends ZeppelinPlugin<IUtilityPluginConfig> {
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<IUtilityPluginConfig> {
Highest: **${highest}ms**
Mean: **${mean}ms**
Time between ping command and first reply: **${msgToMsgDelay}ms**
Shard latency: **${shard.latency}ms**
`),
);