/// <summary> /// Load the configuration from a file /// </summary> /// <param name="filePath">Path to load the configuration file from</param> /// <returns>Returns the deserialized configuration object</returns> public static WhConfig Load(string filePath) { if (!File.Exists(filePath)) { throw new FileNotFoundException("Config not loaded because file not found.", filePath); } var config = MasterFile.LoadInit <WhConfig>(filePath); config.LoadDiscordServers(); return(config); }
public void LoadDmAlerts() { var path = Path.Combine(Strings.AlertsFolder, DmAlertsFile); DmAlerts = MasterFile.LoadInit<AlertMessage>(path); }