From cfd848767d83085a27fed6f33df8b6ae7119f487 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sun, 14 Jun 2020 21:45:16 -0400 Subject: [PATCH] Match more osu! play mode strings --- youmubot-osu/src/discord/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/youmubot-osu/src/discord/mod.rs b/youmubot-osu/src/discord/mod.rs index fb72d97..2b17019 100644 --- a/youmubot-osu/src/discord/mod.rs +++ b/youmubot-osu/src/discord/mod.rs @@ -180,11 +180,11 @@ struct ModeArg(Mode); impl FromStr for ModeArg { type Err = String; fn from_str(s: &str) -> Result { - Ok(ModeArg(match s { - "std" => Mode::Std, - "taiko" => Mode::Taiko, - "catch" => Mode::Catch, - "mania" => Mode::Mania, + Ok(ModeArg(match &s.to_lowercase()[..] { + "osu" | "std" => Mode::Std, + "taiko" | "osu!taiko" => Mode::Taiko, + "ctb" | "fruits" | "catch" | "osu!ctb" | "osu!catch" => Mode::Catch, + "osu!mania" | "mania" => Mode::Mania, _ => return Err(format!("Unknown mode {}", s)), })) }