diff --git a/src/commands/join.rs b/src/commands/join.rs index 4b0ef94..5dfb195 100644 --- a/src/commands/join.rs +++ b/src/commands/join.rs @@ -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(()) }