This commit is contained in:
@@ -17,12 +17,6 @@ pub(crate) async fn join(
|
|||||||
let channel_id =
|
let channel_id =
|
||||||
NonZeroU64::new(channel_id.into()).ok_or("Joined voice channel must have nonzero 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
|
// join the voice channel
|
||||||
state
|
state
|
||||||
.songbird
|
.songbird
|
||||||
@@ -30,5 +24,11 @@ pub(crate) async fn join(
|
|||||||
.await
|
.await
|
||||||
.map_err(|e| format!("Could not join voice channel: {:?}", e))?;
|
.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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user