mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 16:58:55 +00:00
Improve formatting slightly
This commit is contained in:
parent
b5e8a24919
commit
fdae8be75b
2 changed files with 23 additions and 15 deletions
|
@ -368,19 +368,27 @@ impl<'a> ScoreEmbedBuilder<'a> {
|
||||||
};
|
};
|
||||||
m.author(|f| f.name(&u.username).url(u.link()).icon_url(u.avatar_url()))
|
m.author(|f| f.name(&u.username).url(u.link()).icon_url(u.avatar_url()))
|
||||||
.color(0xffb6c1)
|
.color(0xffb6c1)
|
||||||
.title(format!(
|
.title(
|
||||||
"{} | {} - {} [{}] {} ({:.2}\\*) {}| {} {} {}",
|
MessageBuilder::new()
|
||||||
u.username,
|
.push_safe(&u.username)
|
||||||
b.artist,
|
.push(" | ")
|
||||||
b.title,
|
.push_safe(&b.artist)
|
||||||
b.difficulty_name,
|
.push(" - ")
|
||||||
s.mods,
|
.push(&b.title)
|
||||||
stars,
|
.push(" [")
|
||||||
creator,
|
.push_safe(&b.difficulty_name)
|
||||||
score_line,
|
.push("] ")
|
||||||
top_record,
|
.push(s.mods)
|
||||||
world_record,
|
.push(" ")
|
||||||
))
|
.push(format!("({:.2}\\*)", stars))
|
||||||
|
.push(" ")
|
||||||
|
.push_safe(creator)
|
||||||
|
.push("| ")
|
||||||
|
.push(score_line)
|
||||||
|
.push(top_record)
|
||||||
|
.push(world_record)
|
||||||
|
.build(),
|
||||||
|
)
|
||||||
.description(format!(
|
.description(format!(
|
||||||
r#"**Played**: {}
|
r#"**Played**: {}
|
||||||
{}"#,
|
{}"#,
|
||||||
|
@ -423,7 +431,7 @@ pub(crate) fn user_embed(
|
||||||
best: Option<(Score, BeatmapWithMode, BeatmapInfo)>,
|
best: Option<(Score, BeatmapWithMode, BeatmapInfo)>,
|
||||||
m: &mut CreateEmbed,
|
m: &mut CreateEmbed,
|
||||||
) -> &mut CreateEmbed {
|
) -> &mut CreateEmbed {
|
||||||
m.title(u.username)
|
m.title(MessageBuilder::new().push_safe(u.username).build())
|
||||||
.url(format!("https://osu.ppy.sh/users/{}", u.id))
|
.url(format!("https://osu.ppy.sh/users/{}", u.id))
|
||||||
.color(0xffb6c1)
|
.color(0xffb6c1)
|
||||||
.thumbnail(format!("https://a.ppy.sh/{}", u.id))
|
.thumbnail(format!("https://a.ppy.sh/{}", u.id))
|
||||||
|
|
|
@ -137,7 +137,7 @@ pub async fn server_rank(ctx: &Context, m: &Message, mut args: Args) -> CommandR
|
||||||
mw = member_len
|
mw = member_len
|
||||||
));
|
));
|
||||||
for (id, (pp, (member, u))) in users.iter().enumerate() {
|
for (id, (pp, (member, u))) in users.iter().enumerate() {
|
||||||
content.push_line_safe(format!(
|
content.push_line(format!(
|
||||||
"{:>4} | {:>8.2} | {:uw$} | {}",
|
"{:>4} | {:>8.2} | {:uw$} | {}",
|
||||||
format!("#{}", 1 + id + start),
|
format!("#{}", 1 + id + start),
|
||||||
pp,
|
pp,
|
||||||
|
|
Loading…
Add table
Reference in a new issue