public void AddCommand(Command cmd, User user) { if (user.Permission >= 1 && !AddCommandAlreadyMatches(cmd.Trigger)) { commands.Add(cmd); CommandsFile file = new CommandsFile(TwitchChatBot.ChannelIn.Name.ToLower() + "_commands"); file.Add(cmd); RemoveCommand("!list"); _toString = ToString(); commands.Add(new Command("!list", _toString + " and list.")); UpdateArray(); } }
private void Form1_Load(object sender, EventArgs e) { try { initialized = true; cmdFile = new CommandsFile(ChannelIn.Name.ToLower() + "_commands"); modFile = new ModsFile(ChannelIn.Name.ToLower() + "_mods"); } catch(Exception exc) { label1.Text += $"\r\n{exc.ToString()}"; label1.Text += $"\r\nForm Load Error!"; initialized = false; } }