Fixed loading plugins at startup
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user