diff --git a/youmubot-osu/src/discord/embeds.rs b/youmubot-osu/src/discord/embeds.rs index b4323a9..32e1096 100644 --- a/youmubot-osu/src/discord/embeds.rs +++ b/youmubot-osu/src/discord/embeds.rs @@ -328,21 +328,12 @@ impl<'a> ScoreEmbedBuilder<'a> { world_record, )) .description(format!( - r#"**Beatmap**: {} - {} [{}]**{} ** -**Links**: [[Listing]]({}) [[Download]]({}) [[Bloodcat]]({}) -**Played**: {} + r#"**Played**: {} {}"#, - b.artist, - b.title, - b.difficulty_name, - s.mods, - b.link(), - b.download_link(false), - b.download_link(true), s.date.format(""), pp_gained.as_ref().map(|v| &v[..]).unwrap_or(""), )) - .image(b.cover_url()) + .thumbnail(b.thumbnail_url()) .field( "Score stats", format!( @@ -361,8 +352,7 @@ impl<'a> ScoreEmbedBuilder<'a> { ), true, ) - .field("Map stats", diff.format_info(mode, s.mods, b), false) - .timestamp(&s.date); + .field("Map stats", diff.format_info(mode, s.mods, b), false); let mut footer = self.footer.take().unwrap_or_else(String::new); if mode.to_oppai_mode().is_none() && s.mods != Mods::NOMOD { footer += " Star difficulty does not reflect game mods."; @@ -450,12 +440,14 @@ pub(crate) fn user_embed( MessageBuilder::new().push_bold_safe(&map.title).build(), map.difficulty_name, map.link(), - v.mods + v.mods, )) .push(format!( - "{:.1}⭐ | `{}`", - info.map(|i| i.stars as f64).unwrap_or(map.difficulty.stars), - map.short_link(Some(mode), Some(v.mods)) + "> {}", + map.difficulty + .apply_mods(v.mods, info.map(|i| i.stars as f64)) + .format_info(mode, v.mods, &map) + .replace("\n", "\n> ") )) .build(), false, diff --git a/youmubot-osu/src/models/mod.rs b/youmubot-osu/src/models/mod.rs index 500f2eb..d93fbe9 100644 --- a/youmubot-osu/src/models/mod.rs +++ b/youmubot-osu/src/models/mod.rs @@ -3,7 +3,6 @@ use regex::Regex; use serde::{Deserialize, Serialize}; use std::fmt; use std::time::Duration; -use youmubot_prelude::Duration as YoumuDuration; pub mod mods; pub mod parse; @@ -136,8 +135,10 @@ impl Difficulty { let bpm = (self.bpm * 100.0).round() / 100.0; MessageBuilder::new() .push(format!( - "[[Link]]({}) (`{}`)", + "[[Link]]({}) [[DL]]({}) [[Alt]]({}) (`{}`)", original_beatmap.link(), + original_beatmap.download_link(false), + original_beatmap.download_link(true), original_beatmap.short_link(Some(mode), Some(mods)) )) .push(if three_lines { "\n" } else { ", " }) @@ -166,7 +167,12 @@ impl Difficulty { .push_bold(format!("{:.1}", self.hp)) .push(format!(", BPM**{}**", bpm)) .push(", ⌛ ") - .push_bold(format!("{}", YoumuDuration(self.drain_length))) + .push({ + let length = self.drain_length; + let minutes = length.as_secs() / 60; + let seconds = length.as_secs() % 60; + format!("**{}:{:02}** (drain)", minutes, seconds) + }) .build() } }