This commit is contained in:
2023-02-24 16:46:59 +02:00
parent 1cdd2644df
commit 873855937f
3 changed files with 11 additions and 7 deletions

3
.gitignore vendored
View File

@@ -371,4 +371,5 @@ FodyWeavers.xsd
/DiscordBot.rar /DiscordBot.rar
/DiscordBot/Data/ /DiscordBot/Data/
/DiscordBot/Updater/ /DiscordBot/Updater/
.vscode/ .vscode/
.idea/

View File

@@ -146,12 +146,7 @@ internal class CommandHandler
if(split.Length > 1) if(split.Length > 1)
argsClean = string.Join(' ', split, 1, split.Length-1).Split(' '); argsClean = string.Join(' ', split, 1, split.Length-1).Split(' ');
CmdArgs cmd = new() { CmdArgs cmd = new(context, cleanMessage, split[0], argsClean);
context = context,
cleanContent = cleanMessage,
commandUsed = split[0],
arguments = argsClean
};
if (context.Channel is SocketDMChannel) if (context.Channel is SocketDMChannel)
plugin.ExecuteDM(cmd); plugin.ExecuteDM(cmd);

View File

@@ -15,5 +15,13 @@ namespace PluginManager.Others
public string commandUsed { get;init; } public string commandUsed { get;init; }
public string[] arguments { 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;
}
} }
} }