rework ReminderModule
This commit is contained in:
@@ -61,6 +61,18 @@ namespace Discord_Bot
|
||||
return (JObject)JsonConvert.DeserializeObject(configJson.ReadToEnd());
|
||||
}
|
||||
|
||||
public static JToken GetConfigItem(string item)
|
||||
{
|
||||
var config = Functions.GetConfig();
|
||||
if (config.TryGetValue(item, out var result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
var res = new JValue(0);
|
||||
return res.Type == JTokenType.Null;
|
||||
}
|
||||
|
||||
public static void SaveConfig(JObject config)
|
||||
{
|
||||
using (StreamWriter file = File.CreateText(Directory.GetCurrentDirectory() + @"/Config.json"))
|
||||
|
||||
Reference in New Issue
Block a user