mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-16 10:40:12 +00:00
return the def for the full commandd if we have it from parse_command
This commit is contained in:
parent
516eaa5292
commit
8431255930
1 changed files with 3 additions and 3 deletions
|
|
@ -308,7 +308,7 @@ pub fn parse_command(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let full_cmd = command.original.as_deref().unwrap_or(&command);
|
let full_cmd = command.original.as_ref().unwrap_or(&command);
|
||||||
if misplaced_flags.is_empty().not() {
|
if misplaced_flags.is_empty().not() {
|
||||||
let mut error = format!(
|
let mut error = format!(
|
||||||
"Flag{} ",
|
"Flag{} ",
|
||||||
|
|
@ -355,9 +355,9 @@ pub fn parse_command(
|
||||||
flags.insert(name.to_string(), value.clone());
|
flags.insert(name.to_string(), value.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("{} {flags:?} {params:?}", command.cb);
|
println!("{} {flags:?} {params:?}", full_cmd.cb);
|
||||||
return Ok(ParsedCommand {
|
return Ok(ParsedCommand {
|
||||||
command_def: command,
|
command_def: full_cmd.clone(),
|
||||||
flags,
|
flags,
|
||||||
parameters: params,
|
parameters: params,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue