diff --git a/PluralKit.Bot/CommandSystem/Parameters.cs b/PluralKit.Bot/CommandSystem/Parameters.cs index d9acf1c7..6455fdd3 100644 --- a/PluralKit.Bot/CommandSystem/Parameters.cs +++ b/PluralKit.Bot/CommandSystem/Parameters.cs @@ -19,7 +19,6 @@ public abstract record Parameter() public class Parameters { private string _cb { get; init; } - private List _args { get; init; } private Dictionary _flags { get; init; } private Dictionary _params { get; init; } @@ -34,7 +33,6 @@ public class Parameters { var command = ((CommandResult.Ok)result).@command; _cb = command.@commandRef; - _args = command.@args; _flags = command.@flags; _params = command.@params; } diff --git a/crates/commands/src/commands.udl b/crates/commands/src/commands.udl index 53bf8dbd..5080c4b9 100644 --- a/crates/commands/src/commands.udl +++ b/crates/commands/src/commands.udl @@ -18,7 +18,6 @@ interface Parameter { }; dictionary ParsedCommand { string command_ref; - sequence args; record params; record flags; }; diff --git a/crates/commands/src/lib.rs b/crates/commands/src/lib.rs index de6becb0..bef98461 100644 --- a/crates/commands/src/lib.rs +++ b/crates/commands/src/lib.rs @@ -52,7 +52,6 @@ pub enum Parameter { #[derive(Debug)] pub struct ParsedCommand { pub command_ref: String, - pub args: Vec, pub params: HashMap, pub flags: HashMap>, } @@ -64,7 +63,6 @@ pub fn parse_command(prefix: String, input: String) -> CommandResult { // end position of all currently matched tokens let mut current_pos = 0; - let mut args: Vec = Vec::new(); let mut params: HashMap = HashMap::new(); let mut flags: HashMap> = HashMap::new(); @@ -87,7 +85,6 @@ pub fn parse_command(prefix: String, input: String) -> CommandResult { if let Some((param_name, param)) = arg.param.as_ref() { params.insert(param_name.to_string(), param.clone()); } - args.push(arg.raw.to_string()); } if let Some(next_tree) = local_tree.get_branch(&found_token) { @@ -126,7 +123,6 @@ pub fn parse_command(prefix: String, input: String) -> CommandResult { command: ParsedCommand { command_ref: command.cb.into(), params, - args, flags, }, };