diff --git a/.gitignore b/.gitignore index 196f560..57868ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /target .direnv result -.env -*.mp3 \ No newline at end of file +.env \ No newline at end of file diff --git a/discord-tts-bot/src/main.rs b/discord-tts-bot/src/main.rs index 7776c52..5f9466d 100644 --- a/discord-tts-bot/src/main.rs +++ b/discord-tts-bot/src/main.rs @@ -47,16 +47,8 @@ async fn event_handler( new_message.react(&ctx.http, '💤').await?; } else { 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?; - }, - Err(err) => { - println!("{err}"); - new_message.react(&ctx.http, '❌').await?; - new_message.reply(&ctx.http, "TTS failed, message might be too long").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(); } } }