Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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")));
     }
 }