diff --git a/.gitignore b/.gitignore index edb5abd..7cf8b6f 100644 --- a/.gitignore +++ b/.gitignore @@ -371,4 +371,5 @@ FodyWeavers.xsd /DiscordBot.rar /DiscordBot/Data/ /DiscordBot/Updater/ -.vscode/ \ No newline at end of file +.vscode/ +.idea/ \ No newline at end of file diff --git a/DiscordBot/Discord/Core/CommandHandler.cs b/DiscordBot/Discord/Core/CommandHandler.cs index 0bdf254..f030628 100644 --- a/DiscordBot/Discord/Core/CommandHandler.cs +++ b/DiscordBot/Discord/Core/CommandHandler.cs @@ -146,12 +146,7 @@ internal class CommandHandler if(split.Length > 1) argsClean = string.Join(' ', split, 1, split.Length-1).Split(' '); - CmdArgs cmd = new() { - context = context, - cleanContent = cleanMessage, - commandUsed = split[0], - arguments = argsClean - }; + CmdArgs cmd = new(context, cleanMessage, split[0], argsClean); if (context.Channel is SocketDMChannel) plugin.ExecuteDM(cmd); diff --git a/PluginManager/Others/CmdArgs.cs b/PluginManager/Others/CmdArgs.cs index bc3c6fb..14ad428 100644 --- a/PluginManager/Others/CmdArgs.cs +++ b/PluginManager/Others/CmdArgs.cs @@ -15,5 +15,13 @@ namespace PluginManager.Others public string commandUsed { get;init; } public string[] arguments { get;init; } + public CmdArgs(SocketCommandContext context, string cleanContent, string commandUsed, string[] arguments) + { + this.context = context; + this.cleanContent = cleanContent; + this.commandUsed = commandUsed; + this.arguments = arguments; + } + } }