From cc89d37ba5a1d1f3b4cd40a06e81f9e299b104a3 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Tue, 12 Apr 2016 03:07:51 +0200 Subject: [PATCH] fixed carbon updates, changed dark poke icon --- NadekoBot/Classes/NadekoStats.cs | 19 +++++++++++++++---- NadekoBot/bin/Debug/data/PokemonTypes.json | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/NadekoBot/Classes/NadekoStats.cs b/NadekoBot/Classes/NadekoStats.cs index 220a1709..5128a52f 100644 --- a/NadekoBot/Classes/NadekoStats.cs +++ b/NadekoBot/Classes/NadekoStats.cs @@ -100,17 +100,28 @@ namespace NadekoBot }; } - private void SendUpdateToCarbon() + private async Task SendUpdateToCarbon() { + if (string.IsNullOrWhiteSpace(NadekoBot.Creds.CarbonKey)) + return; try { + Console.WriteLine("Joined server."); using (var client = new HttpClient()) { - client.PostAsync("https://www.carbonitex.net/discord/data/botdata.php", - new FormUrlEncodedContent(new Dictionary { + using (var content = new FormUrlEncodedContent(new Dictionary { { "servercount", NadekoBot.Client.Servers.Count().ToString() }, { "key", NadekoBot.Creds.CarbonKey } - })); + })) + { + content.Headers.Clear(); + content.Headers.Add("Content-Type", "application/x-www-form-urlencoded"); + + var res = await client.PostAsync("https://www.carbonitex.net/discord/data/botdata.php", content); + + Console.WriteLine(res.ReasonPhrase); + Console.WriteLine(res.StatusCode); + }; } } catch (Exception ex) diff --git a/NadekoBot/bin/Debug/data/PokemonTypes.json b/NadekoBot/bin/Debug/data/PokemonTypes.json index a6182c55..0257a702 100644 --- a/NadekoBot/bin/Debug/data/PokemonTypes.json +++ b/NadekoBot/bin/Debug/data/PokemonTypes.json @@ -618,7 +618,7 @@ "bite", "faint attack" ], - "Icon": "🕶" + "Icon": "✴" }, { "Name": "STEEL",