NLKIHI6HPJKXA4ZUOQKS2GGOYWFMT7PLDDEA3Y3RPBBZK4XO4TPAC
if args.len() != 1 {
let _ = msg.reply("Donne moi **un** nom !");
let _ = msg.react('❎');
return;
}
let user: String = args.iter().next().unwrap().unwrap();
let user = match get_user_id(user) {
Err(e) => {
let _ = msg.reply(&e);
let mut fail = false;
for name in args.iter() {
let name = match get_user_id(name.unwrap()) {
Err(_) => {
let _ = msg.react('❎');
fail = true;
continue;
}
Ok(u) => u,
};
if msg.author.to_string() == name {
Ok(u) => u,
};
if msg.author.to_string() == user {
let _ = msg.react('❎');
return;
let mut data = ctx.data.lock();
let score = data
.get_mut::<Score>()
.expect("Expected Score in ShareMap.");
let entry = score.entry(name.to_string()).or_insert(0);
*entry = update(*entry);
let mut data = ctx.data.lock();
let score = data
.get_mut::<Score>()
.expect("Expected Score in ShareMap.");
let entry = score.entry(user.to_string()).or_insert(0);
*entry = update(*entry);
let _ = msg.react('👌');
if !fail {
let _ = msg.react('👌');
}