Started new testbed

This commit is contained in:
RogueException
2017-01-24 11:55:41 -04:00
parent fe35400498
commit d9802593ab
12 changed files with 685 additions and 620 deletions

View File

@@ -0,0 +1,21 @@
using Newtonsoft.Json;
using System.IO;
namespace Discord
{
internal class TestConfig
{
[JsonProperty("token")]
public string Token { get; private set; }
[JsonProperty("guild_id")]
public ulong GuildId { get; private set; }
public static TestConfig LoadFile(string path)
{
using (var stream = new FileStream(path, FileMode.Open))
using (var reader = new StreamReader(stream))
using (var jsonReader = new JsonTextReader(reader))
return new JsonSerializer().Deserialize<TestConfig>(jsonReader);
}
}
}