This commit is contained in:
@@ -17,12 +17,6 @@ pub(crate) async fn join(
|
||||
let channel_id =
|
||||
NonZeroU64::new(channel_id.into()).ok_or("Joined voice channel must have nonzero ID.")?;
|
||||
|
||||
// signal that we are not listening
|
||||
if let Some(call_lock) = state.songbird.get(guild_id) {
|
||||
let mut call = call_lock.lock().await;
|
||||
call.deafen(true).await?;
|
||||
}
|
||||
|
||||
// join the voice channel
|
||||
state
|
||||
.songbird
|
||||
@@ -30,5 +24,11 @@ pub(crate) async fn join(
|
||||
.await
|
||||
.map_err(|e| format!("Could not join voice channel: {:?}", e))?;
|
||||
|
||||
// signal that we are not listening
|
||||
if let Some(call_lock) = state.songbird.get(guild_id) {
|
||||
let mut call = call_lock.lock().await;
|
||||
call.deafen(true).await?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user