diff --git a/src/command/join.rs b/src/command/join.rs index ebfecc1..2145aae 100644 --- a/src/command/join.rs +++ b/src/command/join.rs @@ -300,13 +300,7 @@ pub async fn handle(state: State, interaction: Interaction) { user_data_manager: state.user_data_manager, }; - let call = state - .songbird - .join(guild_id, voice_channel_id) - .await - .expect("TODO"); - tracing::error!(?call, "successfully joined"); - + let call = state.songbird.get_or_insert(guild_id); { let mut call = call.lock().await; @@ -316,6 +310,13 @@ pub async fn handle(state: State, interaction: Interaction) { call.mute(true).await.expect("TODO"); } + state + .songbird + .join(guild_id, voice_channel_id) + .await + .expect("TODO"); + tracing::error!(?call, "successfully joined"); + let channel_mention = format!("<#{voice_channel_id}>"); let info_mention = format!(