mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-18 00:08:54 +00:00
Match more osu! play mode strings
This commit is contained in:
parent
cafa65581c
commit
cfd848767d
1 changed files with 5 additions and 5 deletions
|
@ -180,11 +180,11 @@ struct ModeArg(Mode);
|
||||||
impl FromStr for ModeArg {
|
impl FromStr for ModeArg {
|
||||||
type Err = String;
|
type Err = String;
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
Ok(ModeArg(match s {
|
Ok(ModeArg(match &s.to_lowercase()[..] {
|
||||||
"std" => Mode::Std,
|
"osu" | "std" => Mode::Std,
|
||||||
"taiko" => Mode::Taiko,
|
"taiko" | "osu!taiko" => Mode::Taiko,
|
||||||
"catch" => Mode::Catch,
|
"ctb" | "fruits" | "catch" | "osu!ctb" | "osu!catch" => Mode::Catch,
|
||||||
"mania" => Mode::Mania,
|
"osu!mania" | "mania" => Mode::Mania,
|
||||||
_ => return Err(format!("Unknown mode {}", s)),
|
_ => return Err(format!("Unknown mode {}", s)),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue