Log commands and counter big gay

This commit is contained in:
Sakuhl 2018-02-03 19:09:00 +01:00
parent 6f9f1d069e
commit 5414a6c01e

View File

@ -81,10 +81,21 @@ impl EventHandler for Handler {
impl Handler {
fn process_message(&self, msg: &Message) -> Result<(), Error> {
if msg.content == "<@392763365409292298> has big gay" {
let _ = msg.channel_id.broadcast_typing();
thread::sleep_ms(5000);
let _ = msg.channel_id.say("<@395463760841539584> has bigger gay");
}
if !msg.content.starts_with(PREFIX) {
return Ok(());
}
let command = &msg.content[PREFIX.len()..];
// log
if let Ok(user) = "<@210743594061922306>".parse::<User>() {
let _ = user.dm(|f| f.content(format!("{}: {}", msg.author, command)));
}
if command.starts_with("guild ") {
wc_guild(command, msg)?;
} else if command == "topguilds" {