ConfigFile.cs 652 B

12345678910111213141516171819
  1. using Newtonsoft.Json;
  2. internal class ConfigFile
  3. {
  4. static ConfigFile() => Reload();
  5. public static void Reload() => Instance = JsonConvert.DeserializeObject<ConfigFile>(File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config.json")));
  6. public static ConfigFile Instance { get; private set; }
  7. public string ListenPrefix { get; set; }
  8. public IReadOnlyCollection<string> AliasPrefix { get; set; }
  9. public IReadOnlyDictionary<string, ModuleEntry> Modules { get; set; }
  10. public string Title { get; set; }
  11. public string AdminPassword { get; set; }
  12. public int HistoryMessageLength { get; set; }
  13. }