From 949ce5b38bff571dc5c407b3ea018b5e1fa9ff9e Mon Sep 17 00:00:00 2001 From: Jacob Date: Wed, 13 May 2026 22:25:05 -0400 Subject: [PATCH] chore: move call configuration to after handler instantiation to reduce time between them --- src/command/join.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/command/join.rs b/src/command/join.rs index ba594c5..12061b0 100644 --- a/src/command/join.rs +++ b/src/command/join.rs @@ -275,14 +275,6 @@ pub async fn handle(state: State, interaction: Interaction) { .await .expect("TODO"); - let call = state - .songbird - .join(guild_id, voice_channel_id) - .await - .expect("TODO"); - - tracing::error!(?call, "successfully joined"); - let start_instant = Instant::now(); let start_utc = UtcDateTime::now(); @@ -304,6 +296,13 @@ 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 mut call = call.lock().await;