Compare commits

..

No commits in common. '502517cfcbbfcb7dc9b5bf077fc4884cb081c729' and '4d024d07a79435015bc3724656261930fc39f1d4' have entirely different histories.

3
.gitignore vendored

@ -1,5 +1,4 @@
/target /target
.direnv .direnv
result result
.env .env
*.mp3

@ -47,16 +47,8 @@ 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"))) { new_message.react(&ctx.http, '✅').await?;
Ok(_) => { NARRATOR.speak(&format!("{} says {}", new_message.author.name, RE.replace_all(&new_message.content[PREFIX.len()..], "$1"))).unwrap();
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?;
},
}
} }
} }
} }

Loading…
Cancel
Save