osu: add /s/{id} links to the link parser, support beatmapsets with mode override

This commit is contained in:
Natsu Kagami 2025-02-20 14:16:56 +01:00 committed by Natsu Kagami
parent c28cad0718
commit 84b152adf6
5 changed files with 40 additions and 15 deletions

View file

@ -865,7 +865,13 @@ pub async fn last(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult
Some((bm, mods_def)) => {
let mods = args.find::<UnparsedMods>().ok();
if beatmapset {
let beatmapset = env.beatmaps.get_beatmapset(bm.0.beatmapset_id).await?;
let beatmapset = env
.beatmaps
.get_beatmapset(
bm.0.beatmapset_id,
None, /* Note that we cannot know, so don't force that */
)
.await?;
let reply = msg
.reply(&ctx, "Here is the beatmapset you requested!")
.await?;