From 59551f1f6af2024d3f5b7faf060980a07a0bb581 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Fri, 17 Feb 2023 14:02:42 +0100 Subject: [PATCH] Fix osu commands with replies --- youmubot-osu/src/discord/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youmubot-osu/src/discord/mod.rs b/youmubot-osu/src/discord/mod.rs index d187fbc..1cbfd02 100644 --- a/youmubot-osu/src/discord/mod.rs +++ b/youmubot-osu/src/discord/mod.rs @@ -400,7 +400,7 @@ pub(crate) async fn load_beatmap( if let Some(replied) = &msg.referenced_message { // Try to look for a mention of the replied message. let beatmap_id = SHORT_LINK_REGEX.captures(&replied.content).or_else(|| { - msg.embeds.iter().find_map(|e| { + replied.embeds.iter().find_map(|e| { e.description .as_ref() .and_then(|v| SHORT_LINK_REGEX.captures(&v)) @@ -446,6 +446,7 @@ pub(crate) async fn load_beatmap( } #[command] +#[aliases("map")] #[description = "Show information from the last queried beatmap."] #[usage = "[--set/-s/--beatmapset] / [mods = no mod]"] #[delimiters(" ")]