diff --git a/youmubot-osu/src/discord/embeds.rs b/youmubot-osu/src/discord/embeds.rs index 4b1fe17..6478341 100644 --- a/youmubot-osu/src/discord/embeds.rs +++ b/youmubot-osu/src/discord/embeds.rs @@ -259,7 +259,6 @@ pub(crate) fn score_embed<'a>( s.date.format("%F %T"), )) .image(b.cover_url()) - .field("Map stats", diff.format_info(mode, s.mods, b), false) .field( "Score stats", format!( @@ -278,6 +277,7 @@ pub(crate) fn score_embed<'a>( ), true, ) + .field("Map stats", diff.format_info(mode, s.mods, b), false) .timestamp(&s.date); if mode.to_oppai_mode().is_none() && s.mods != Mods::NOMOD { m.footer(|f| f.text("Star difficulty does not reflect game mods.")); diff --git a/youmubot-osu/src/models/mod.rs b/youmubot-osu/src/models/mod.rs index 42f17d9..891c6e3 100644 --- a/youmubot-osu/src/models/mod.rs +++ b/youmubot-osu/src/models/mod.rs @@ -126,13 +126,18 @@ impl Difficulty { /// Format the difficulty info into a short summary. pub fn format_info(&self, mode: Mode, mods: Mods, original_beatmap: &Beatmap) -> String { + let is_not_ranked = match original_beatmap.approval { + ApprovalStatus::Ranked(_) => false, + _ => true, + }; + let three_lines = is_not_ranked; MessageBuilder::new() .push(format!( "[[Link]]({}) (`{}`)", original_beatmap.link(), original_beatmap.short_link(Some(mode), Some(mods)) )) - .push(", ") + .push(if three_lines { "\n" } else { ", " }) .push_bold(format!("{:.2}⭐", self.stars)) .push(", ") .push( @@ -142,6 +147,11 @@ impl Difficulty { .map(|c| format!("max **{}x**, ", c)) .unwrap_or_else(|| "".to_owned()), ) + .push(if is_not_ranked { + format!("status **{}**, mode ", original_beatmap.approval) + } else { + "".to_owned() + }) .push_bold_line(format_mode(mode, original_beatmap.mode)) .push("CS") .push_bold(format!("{:.1}", self.cs))