Example #1
0
        public bool RemoveCommand(string commandName)
        {
            if (!DeleteCommand(commandName))
            {
                return(false);
            }

            SaveCommands();
            OnReloadCommands?.Invoke();

            return(true);
        }
Example #2
0
        public bool EditCommand(string oldCommandName, MemeCommand newCommand)
        {
            if (!ValidateNewCommand(newCommand) || !DeleteCommand(oldCommandName))
            {
                return(false);
            }

            MemeCommands.Add(newCommand);
            SaveCommands();
            OnReloadCommands?.Invoke();

            return(true);
        }
Example #3
0
        public bool AddCommand(MemeCommand newCommand)
        {
            if (!ValidateNewCommand(newCommand))
            {
                return(false);
            }

            MemeCommands.Add(newCommand);
            SaveCommands();
            OnReloadCommands?.Invoke();

            return(true);
        }