osu: Forget about mods when querying a beatmap for check

This commit is contained in:
Natsu Kagami 2024-02-29 14:23:06 +01:00
parent b4cf6ce94f
commit d158d4015e
Signed by: nki
GPG key ID: 55A032EB38B49ADB

View file

@ -576,13 +576,16 @@ pub async fn check(ctx: &Context, msg: &Message, mut args: Args) -> CommandResul
let data = ctx.data.read().await;
let bm = load_beatmap(ctx, msg).await;
match bm {
let bm = match bm {
Some((bm, _)) => bm,
None => {
msg.reply(&ctx, "No beatmap queried on this channel.")
.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 m = bm.1;
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?;
}
}
Ok(())
}