Fixed lock up on multiple say messages
+ clippy + fmt
This commit is contained in:
parent
41213db8d4
commit
883a235ab6
@ -178,10 +178,8 @@ pub async fn speak(
|
||||
|
||||
let (handler_lock, success_reader) = manager.join(guild_id, connect_to).await;
|
||||
|
||||
success_reader.unwrap();
|
||||
|
||||
let mut handler = handler_lock.lock().await;
|
||||
|
||||
if success_reader.is_ok() {
|
||||
for word in sentence {
|
||||
let word_path = dict.get(&word).unwrap();
|
||||
|
||||
@ -200,9 +198,9 @@ pub async fn speak(
|
||||
|
||||
tokio::time::sleep(duration).await;
|
||||
}
|
||||
}
|
||||
|
||||
handler.leave().await.unwrap();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user