mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 08:10:10 +00:00
fix(commands): make flags not match if param was in quotes
This commit is contained in:
parent
a21210f3ce
commit
413b8c1915
3 changed files with 38 additions and 17 deletions
|
|
@ -88,7 +88,7 @@ impl TokenMatchedValue {
|
|||
type TryMatchResult = Option<Result<Option<TokenMatchedValue>, TokenMatchError>>;
|
||||
|
||||
impl Token {
|
||||
pub fn try_match(&self, input: Option<SmolStr>) -> TryMatchResult {
|
||||
pub fn try_match(&self, input: Option<&str>) -> TryMatchResult {
|
||||
let input = match input {
|
||||
Some(input) => input,
|
||||
None => {
|
||||
|
|
@ -305,6 +305,7 @@ impl FromStr for MemberPrivacyTarget {
|
|||
type Err = ();
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
// todo: this doesnt parse all the possible ways
|
||||
match s.to_lowercase().as_str() {
|
||||
"visibility" => Ok(Self::Visibility),
|
||||
"name" => Ok(Self::Name),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue