2018-04-03 12:40:24 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using DeukBot4.MessageHandlers;
|
2018-03-28 23:34:48 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace DeukBot4
|
|
|
|
|
{
|
|
|
|
|
public class Settings
|
|
|
|
|
{
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string Token { get; private set; }
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string Username { get; private set; }
|
|
|
|
|
[JsonProperty]
|
|
|
|
|
public ulong OwnerId { get; private set; }
|
2018-03-29 13:35:00 +00:00
|
|
|
|
[JsonProperty]
|
|
|
|
|
public string DatabaseConnectionString { get; private set; }
|
2018-04-03 12:40:24 +00:00
|
|
|
|
[JsonProperty]
|
|
|
|
|
public List<ServerChannelIDs> BackupChannels { get; private set; }
|
|
|
|
|
[JsonProperty]
|
2019-01-15 16:48:48 +00:00
|
|
|
|
public ImageBackupHandler.WebDavSettings WebDavSettings { get; private set; }
|
2018-05-18 11:36:06 +00:00
|
|
|
|
[JsonProperty]
|
|
|
|
|
public ulong DmChannel { get; private set; }
|
2018-03-28 23:34:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static Settings FromJsonFile(string filepath)
|
|
|
|
|
{
|
|
|
|
|
var s = File.ReadAllText(filepath);
|
|
|
|
|
return JsonConvert.DeserializeObject<Settings>(s);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|