public Admin(ulong guildId, Program program) : base(guildId, program) { this.program = program; disabledCommands = new List <DisabledCommand>(); renamedCommands = new List <RenamedCommand>(); administrators = new List <DiscordUser>(); OtherSettings = new OtherSettings(); }
private void LoadData() { if (File.Exists(Path.Combine(BotMethods.GetCommandInstanceDataPath(this, this), "disabled-commands.json"))) { disabledCommands = JsonConvert.DeserializeObject <List <DisabledCommand> >(File.ReadAllText(Path.Combine(BotMethods.GetCommandInstanceDataPath(this, this), "disabled-commands.json"))); } if (File.Exists(Path.Combine(BotMethods.GetCommandInstanceDataPath(this, this), "renamed-commands.json"))) { renamedCommands = JsonConvert.DeserializeObject <List <RenamedCommand> >(File.ReadAllText(Path.Combine(BotMethods.GetCommandInstanceDataPath(this, this), "renamed-commands.json"))); } if (File.Exists(Path.Combine(BotMethods.GetCommandInstanceDataPath(this, this), "administrators.json"))) { administrators = JsonConvert.DeserializeObject <List <DiscordUser> >(File.ReadAllText(Path.Combine(BotMethods.GetCommandInstanceDataPath(this, this), "administrators.json"))); } if (File.Exists(Path.Combine(BotMethods.GetCommandInstanceDataPath(this, this), "other-settings.json"))) { OtherSettings = JsonConvert.DeserializeObject <OtherSettings>(File.ReadAllText(Path.Combine(BotMethods.GetCommandInstanceDataPath(this, this), "other-settings.json"))); } }