Skip to content
Snippets Groups Projects
Unverified Commit bc3a4f18 authored by tec's avatar tec
Browse files

Improve profile change logging + fix typo

parent f6ce5d1f
No related merge requests found
...@@ -157,7 +157,7 @@ impl Commands { ...@@ -157,7 +157,7 @@ impl Commands {
}) })
); );
let mut verification_message = MessageBuilder::new(); let mut verification_message = MessageBuilder::new();
verification_message.push(format!("Great, {}! Verification was successful. To proide friendly a introduction to yourself consider doing ", &full_member.username)); verification_message.push(format!("Great, {}! Verification was successful. To provide a friendly introduction to yourself, consider doing ", &full_member.username));
verification_message.push_mono(format!("{}set bio <info>", CONFIG.command_prefix)); verification_message.push_mono(format!("{}set bio <info>", CONFIG.command_prefix));
send_message!( send_message!(
msg.channel_id, msg.channel_id,
...@@ -358,6 +358,13 @@ impl Commands { ...@@ -358,6 +358,13 @@ impl Commands {
}; };
match set_property { match set_property {
Ok(_) => { Ok(_) => {
info!(
"Set {}'s {} in profile to {}",
&msg.author_nick(ctx.http.clone())
.unwrap_or(String::from("?")),
property,
value
);
if property == "git" && member.photo == None { if property == "git" && member.photo == None {
let git_url = Url::parse(&value).unwrap(); // we parsed this earlier and it was fine let git_url = Url::parse(&value).unwrap(); // we parsed this earlier and it was fine
match git_url.host_str() { match git_url.host_str() {
...@@ -374,11 +381,10 @@ impl Commands { ...@@ -374,11 +381,10 @@ impl Commands {
), ),
) )
.expect("Attempt to set member photo failed"); .expect("Attempt to set member photo failed");
} else { info!(" ... and set profile photo to github photo")
info!("Git path added (2), {}", git_url.path());
} }
} }
_ => info!("Git path added, {}", git_url.path()), _ => {}
} }
} }
} }
...@@ -409,5 +415,10 @@ impl Commands { ...@@ -409,5 +415,10 @@ impl Commands {
_ => Err(diesel::result::Error::NotFound), _ => Err(diesel::result::Error::NotFound),
} }
.expect("Unable to clear profile field"); .expect("Unable to clear profile field");
info!(
"Cleared {}'s {} in profile",
&msg.author_nick(ctx.http).unwrap_or(String::from("?")),
field,
);
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment