mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-02-02 00:13:25 +00:00
more stats
This commit is contained in:
parent
e128633471
commit
8895d9679d
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CompatApiClient.Utils;
|
||||
@ -30,7 +31,10 @@ namespace CompatBot.Commands
|
||||
.AddField("Discord latency", $"{ctx.Client.Ping} ms", true)
|
||||
.AddField("GitHub rate limit", $"{GithubClient.Client.RateLimitRemaining} out of {GithubClient.Client.RateLimit} calls available\nReset in {(GithubClient.Client.RateLimitResetTime - DateTime.UtcNow).AsShortTimespan()}", true)
|
||||
.AddField("Google Drive API", File.Exists(Config.GoogleApiConfigPath) ? "✅ Configured" : "❌ Not configured")
|
||||
.AddField(".NET versions", $"Runtime {System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion()}\n{System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription}", true);
|
||||
.AddField(".NET versions", $"Runtime {System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion()}\n" +
|
||||
$"{System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription}\n" +
|
||||
$"SIMD Acceleration:{(Vector.IsHardwareAccelerated ? "✅ Supported" : "❌ Not supported")}\n" +
|
||||
$"Confinement: {SandboxDetector.Detect() ?? "None"}", true);
|
||||
AppendPiracyStats(embed);
|
||||
AppendCmdStats(ctx, embed);
|
||||
AppendExplainStats(embed);
|
||||
|
18
CompatBot/Utils/SandboxDetector.cs
Normal file
18
CompatBot/Utils/SandboxDetector.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace CompatBot.Utils
|
||||
{
|
||||
public static class SandboxDetector
|
||||
{
|
||||
public static string Detect()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SNAP")))
|
||||
return "Snap";
|
||||
|
||||
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("FLATPAK_SYSTEM_DIR")))
|
||||
return "Flatpak";
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user