From d75dc4a2fb8c58ea3a29bcc60a13904d430b8345 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Wed, 12 Jul 2017 16:11:18 +0200 Subject: [PATCH] Update StatsService.cs --- src/NadekoBot/Services/Impl/StatsService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/src/NadekoBot/Services/Impl/StatsService.cs index c34fe56c..a17fb32a 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/src/NadekoBot/Services/Impl/StatsService.cs @@ -116,6 +116,14 @@ namespace NadekoBot.Services.Impl return Task.CompletedTask; }; + + var platform = "other"; + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + platform = "linux"; + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + platform = "osx"; + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + platform = "windows"; carbonitexTimer = new Timer(async (state) => { @@ -151,7 +159,7 @@ namespace NadekoBot.Services.Impl { using (var content = new FormUrlEncodedContent( new Dictionary { - { "id", string.Concat(MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(_creds.ClientId.ToString())).Select(x => x.ToString("X2"))) }, + { "id", string.Concat(MD5.Create().ComputeHash(Encoding.ASCII.GetBytes(NadekoBot.Credentials.ClientId.ToString())).Select(x => x.ToString("X2"))) }, { "guildCount", _client.GetGuildCount().ToString() }, { "version", BotVersion }, { "platform", platform }}))