Fixed loading plugins at startup

This commit is contained in:
2023-06-15 22:12:15 +03:00
parent 188920ec7f
commit 970c519a32
4 changed files with 4 additions and 4 deletions

View File

@@ -50,7 +50,7 @@ public class Program
{ {
#if DEBUG #if DEBUG
Console.WriteLine("Debug mode enabled"); Console.WriteLine("Debug mode enabled");
internalActionManager.Execute("plugin", "load").Wait(); // Load plugins at startup
#endif #endif
while (true) while (true)

View File

@@ -37,7 +37,7 @@ namespace PluginManager.Others.Actions
Config.Logger.Log($"Action {name} loaded successfully", typeName, LogLevel.INFO); Config.Logger.Log($"Action {name} loaded successfully", typeName, LogLevel.INFO);
} }
public async Task<string> Execute(string actionName, string[]? args) public async Task<string> Execute(string actionName, params string[]? args)
{ {
if (!Actions.ContainsKey(actionName)) if (!Actions.ContainsKey(actionName))
{ {

View File

@@ -13,7 +13,7 @@ namespace PluginManager.Others
public SocketCommandContext context { get; init; } public SocketCommandContext context { get; init; }
public string cleanContent { get; init; } public string cleanContent { get; init; }
public string commandUsed { get;init; } public string commandUsed { get;init; }
public string[] arguments { get;init; } public string[]? arguments { get;init; }
public DBCommandExecutingArguments(SocketCommandContext context, string cleanContent, string commandUsed, string[] arguments) public DBCommandExecutingArguments(SocketCommandContext context, string cleanContent, string commandUsed, string[] arguments)
{ {