private void RefreshRepository() { _logger.LogMessage("Module change detected"); _logger.LogMessage("Refreshing plugin repository!"); var tempModules = GetModulesRef(); CustomCommandsModules = new PluginManager <NexusCommandModule>(tempModules); ScheduledTasksModules = new PluginManager <NexusScheduledTaskModule>(tempModules); AssemblyModules = new PluginManager <NexusAssemblyModule>(tempModules); Task.Run(async() => await ModulesManager.ReloadModules()); _logger.LogMessage("Refreshed!"); }