|
|
|
@ -379,7 +379,7 @@ pub async fn leaderboard(ctx: &Context<'_>) -> Result<(), Error> {
|
|
|
|
|
let profile = format!("https://discord.com/users/{id}");
|
|
|
|
|
let name = &user.name;
|
|
|
|
|
let discriminator = user.discriminator;
|
|
|
|
|
leaderboard_html.push_str(&format!("<tr><td>{place}</td><td><a href=\"{profile}\" target=\"_blank\" class=\"no-underline\"><img src=\"{avatar}\" alt=\"avatar\"> <span class=\"underline\">{name}<span class=\"muted\">#{:0>4}</span></span></a></td><td>{count}</td></tr>", discriminator));
|
|
|
|
|
leaderboard_html.push_str(&format!("<tr><td>{place}</td><td><a href=\"{profile}\" target=\"_blank\" class=\"no-underline\"><img src=\"{avatar}\" onerror=\"this.src='/default.png'\"> <span class=\"underline\">{name}<span class=\"muted\">#{:0>4}</span></span></a></td><td>{count}</td></tr>", discriminator));
|
|
|
|
|
}
|
|
|
|
|
leaderboard_html.push_str("</table>");
|
|
|
|
|
let mut file = std::fs::OpenOptions::new()
|
|
|
|
|