diff --git a/src/pole_dialogue/mod.rs b/src/pole_dialogue/mod.rs index 0d7b92c..3a21d29 100644 --- a/src/pole_dialogue/mod.rs +++ b/src/pole_dialogue/mod.rs @@ -164,10 +164,19 @@ pub fn get_top(msg: Message, bot: Bot) -> ::SendMessage { let db = database::DatabasePole::get_database(); let top = db.get_top_users(&msg.chat.id.0.to_string()); let mut repl = String::new(); - for u in top { - repl.push_str(&(u.1 + ": " + &u.0.to_string() + " puntos\n")); + + for (i, u) in top.iter().enumerate() { + let medal = match i { + 0 => "🥇 ", + 1 => "🥈 ", + 2 => "🥉 ", + _ => "", + }; + + repl.push_str(&format!("{}{}: {} puntos\n", medal, u.1, u.0)); } - bot.send_message(msg.chat.id, format!("{}", repl)) + + bot.send_message(msg.chat.id, repl) } /*#[cfg(test)]