fixed carbon updates, changed dark poke icon

This commit is contained in:
Master Kwoth 2016-04-12 03:07:51 +02:00
parent 3af13550c2
commit cc89d37ba5
2 changed files with 16 additions and 5 deletions

View File

@ -100,17 +100,28 @@ namespace NadekoBot
}; };
} }
private void SendUpdateToCarbon() private async Task SendUpdateToCarbon()
{ {
if (string.IsNullOrWhiteSpace(NadekoBot.Creds.CarbonKey))
return;
try try
{ {
Console.WriteLine("Joined server.");
using (var client = new HttpClient()) using (var client = new HttpClient())
{ {
client.PostAsync("https://www.carbonitex.net/discord/data/botdata.php", using (var content = new FormUrlEncodedContent(new Dictionary<string, string> {
new FormUrlEncodedContent(new Dictionary<string, string> {
{ "servercount", NadekoBot.Client.Servers.Count().ToString() }, { "servercount", NadekoBot.Client.Servers.Count().ToString() },
{ "key", NadekoBot.Creds.CarbonKey } { "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) catch (Exception ex)

View File

@ -618,7 +618,7 @@
"bite", "bite",
"faint attack" "faint attack"
], ],
"Icon": "🕶" "Icon": ""
}, },
{ {
"Name": "STEEL", "Name": "STEEL",