mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-20 01:08:55 +00:00
osu: Forget about mods when querying a beatmap for check
This commit is contained in:
parent
b4cf6ce94f
commit
d158d4015e
1 changed files with 43 additions and 42 deletions
|
@ -576,13 +576,16 @@ pub async fn check(ctx: &Context, msg: &Message, mut args: Args) -> CommandResul
|
||||||
let data = ctx.data.read().await;
|
let data = ctx.data.read().await;
|
||||||
let bm = load_beatmap(ctx, msg).await;
|
let bm = load_beatmap(ctx, msg).await;
|
||||||
|
|
||||||
match bm {
|
let bm = match bm {
|
||||||
|
Some((bm, _)) => bm,
|
||||||
None => {
|
None => {
|
||||||
msg.reply(&ctx, "No beatmap queried on this channel.")
|
msg.reply(&ctx, "No beatmap queried on this channel.")
|
||||||
.await?;
|
.await?;
|
||||||
|
return Ok(());
|
||||||
}
|
}
|
||||||
Some((bm, mods_def)) => {
|
};
|
||||||
let mods = args.find::<Mods>().ok().or(mods_def).unwrap_or(Mods::NOMOD);
|
|
||||||
|
let mods = args.find::<Mods>().ok().unwrap_or_default();
|
||||||
let b = &bm.0;
|
let b = &bm.0;
|
||||||
let m = bm.1;
|
let m = bm.1;
|
||||||
let style = args
|
let style = args
|
||||||
|
@ -625,8 +628,6 @@ pub async fn check(ctx: &Context, msg: &Message, mut args: Args) -> CommandResul
|
||||||
}
|
}
|
||||||
|
|
||||||
style.display_scores(scores, m, ctx, msg).await?;
|
style.display_scores(scores, m, ctx, msg).await?;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue