feat: add last global restart time to pk;stats card

This commit is contained in:
spiral 2021-09-13 01:53:06 -04:00
parent b3a8432039
commit 13f5b63c59
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -114,8 +114,8 @@ namespace PluralKit.Bot
.Field(new("Memory usage", $"{memoryUsage / 1024 / 1024} MiB", true)) .Field(new("Memory usage", $"{memoryUsage / 1024 / 1024} MiB", true))
.Field(new("Latency", $"API: {apiLatency.TotalMilliseconds:F0} ms, shard: {shardInfo.ShardLatency.Milliseconds} ms", true)) .Field(new("Latency", $"API: {apiLatency.TotalMilliseconds:F0} ms, shard: {shardInfo.ShardLatency.Milliseconds} ms", true))
.Field(new("Total numbers", $"{totalSystems:N0} systems, {totalMembers:N0} members, {totalGroups:N0} groups, {totalSwitches:N0} switches, {totalMessages:N0} messages")) .Field(new("Total numbers", $"{totalSystems:N0} systems, {totalMembers:N0} members, {totalGroups:N0} groups, {totalSwitches:N0} switches, {totalMessages:N0} messages"))
.Timestamp(now.ToDateTimeOffset().ToString("O")) .Timestamp(Process.GetCurrentProcess().StartTime.ToString("O"))
.Footer(new($"PluralKit {BuildInfoService.Version} • https://github.com/xSke/PluralKit")); ; .Footer(new($"PluralKit {BuildInfoService.Version} • https://github.com/xSke/PluralKit • Last restarted: ")); ;
await ctx.Rest.EditMessage(msg.ChannelId, msg.Id, await ctx.Rest.EditMessage(msg.ChannelId, msg.Id,
new MessageEditRequest { Content = "", Embed = embed.Build() }); new MessageEditRequest { Content = "", Embed = embed.Build() });
} }