|
|
@ -47,8 +47,16 @@ async fn event_handler(
|
|
|
|
new_message.react(&ctx.http, '💤').await?;
|
|
|
|
new_message.react(&ctx.http, '💤').await?;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
println!("{}: {}", new_message.author.name, new_message.content);
|
|
|
|
println!("{}: {}", new_message.author.name, new_message.content);
|
|
|
|
|
|
|
|
match NARRATOR.speak(&format!("{} says {}", new_message.author.name, RE.replace_all(&new_message.content[PREFIX.len()..], "$1"))) {
|
|
|
|
|
|
|
|
Ok(_) => {
|
|
|
|
new_message.react(&ctx.http, '✅').await?;
|
|
|
|
new_message.react(&ctx.http, '✅').await?;
|
|
|
|
NARRATOR.speak(&format!("{} says {}", new_message.author.name, RE.replace_all(&new_message.content[PREFIX.len()..], "$1"))).unwrap();
|
|
|
|
},
|
|
|
|
|
|
|
|
Err(err) => {
|
|
|
|
|
|
|
|
println!("{err}");
|
|
|
|
|
|
|
|
new_message.react(&ctx.http, '❌').await?;
|
|
|
|
|
|
|
|
new_message.reply(&ctx.http, "TTS failed, message might be too long").await?;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|