Plugin Updater

This commit is contained in:
2024-02-27 19:42:59 +02:00
parent 8c06df9110
commit a2179787b9
9 changed files with 127 additions and 24 deletions

View File

@@ -43,7 +43,7 @@ internal class Loader
}
catch
{
OnFileLoadedException?.Invoke(new FileLoaderResult(file, "Failed to load file"));
OnFileLoadedException?.Invoke(new FileLoaderResult(file, $"Failed to load file {file}"));
}
}

View File

@@ -3,6 +3,7 @@ using System.Threading.Tasks;
using Discord.WebSocket;
using PluginManager.Interfaces;
using PluginManager.Others;
using PluginManager.Updater.Plugins;
namespace PluginManager.Loaders;
@@ -31,13 +32,12 @@ public class PluginLoader
public async Task LoadPlugins()
{
Commands = new List<DBCommand>();
Events = new List<DBEvent>();
SlashCommands = new List<DBSlashCommand>();
Config.Logger.Log("Loading plugins...", typeof(PluginLoader));
var loader = new Loader(Config.AppSettings["PluginFolder"], "dll");
loader.OnFileLoadedException += FileLoadedException;