fix Config.json
This commit is contained in:
@@ -51,8 +51,14 @@ namespace Discord_Bot
|
||||
|
||||
public static JObject GetConfig()
|
||||
{
|
||||
using StreamReader configJson = new StreamReader(Directory.GetCurrentDirectory() + @"/Config.json");
|
||||
return (JObject)JsonConvert.DeserializeObject(configJson.ReadToEnd());
|
||||
string path = Directory.GetCurrentDirectory() + @"/Config.json";
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
throw new FileNotFoundException("gde config?");
|
||||
}
|
||||
|
||||
using StreamReader configJson = new StreamReader(path);
|
||||
return (JObject)JsonConvert.DeserializeObject(configJson.ReadToEnd());
|
||||
}
|
||||
|
||||
public static void SaveConfig(JObject config)
|
||||
|
||||
Reference in New Issue
Block a user