From 0f566db423bfb15c9e018d64761d02aa58eaaa5b Mon Sep 17 00:00:00 2001 From: HueByte Date: Sat, 17 Sep 2022 01:26:19 +0200 Subject: [PATCH] T #66 New uptime format --- Huppy/Huppy.App/Commands/SlashCommands/DevCommands.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Huppy/Huppy.App/Commands/SlashCommands/DevCommands.cs b/Huppy/Huppy.App/Commands/SlashCommands/DevCommands.cs index b003a31..5bd6946 100644 --- a/Huppy/Huppy.App/Commands/SlashCommands/DevCommands.cs +++ b/Huppy/Huppy.App/Commands/SlashCommands/DevCommands.cs @@ -54,18 +54,12 @@ public async Task GetStatus() var avgExecutionTime = await _resourceService.GetAverageExecutionTimeAsync(); var upTime = _resourceService.GetUpTime(); - var upTimeFormatted = string.Format( - @"{0}::{1}::{2}::{3}::{4}", - upTime.Days, - upTime.Hours, - upTime.Minutes, - upTime.Seconds, - upTime.Milliseconds); + var upTimeFormatted = upTime.ToString("d'd 'hh':'mm':'ss"); embed.AddField("CPU", $"`{cpuUsage}`", true); embed.AddField("RAM", $"`{ramUsage}`", true); embed.AddField("Shard Count", $"`{shardCount}`", true); - embed.AddField("Bot Uptime (DD:HH:MM:SS:MS)", $"`{upTimeFormatted}`", true); + embed.AddField("Bot Uptime", $"`{upTimeFormatted}`", true); embed.AddField("Average command executon time", $"`{avgExecutionTime} ms`", true); embed.AddField("Bot Version", $"`v...`", true); embed.AddField("IsServerGC", $"`{GCSettings.IsServerGC}`", true);