Improve logging

This commit is contained in:
Sakuhl 2018-02-25 10:12:09 +01:00
parent 34527088ab
commit 045d67aee5

View File

@ -113,7 +113,12 @@ impl EventHandler for Handler {
let command = &msg.content[prefix.len()..];
// log
if let Ok(user) = "<@210743594061922306>".parse::<User>() {
let _ = user.dm(|f| f.content(format!("{}: {}", msg.author, command)));
let _ = user.dm(|f| f.content(format!("{}: {}: {}: {}", match msg.channel_id.get().unwrap() {
Channel::Guild(channel) => {
channel.read().unwrap().guild_id.get().unwrap().name
},
_ => unimplemented!()
}, msg.channel_id.get().unwrap(), msg.author, command)));
}
}
}