chore: move call configuration to after handler instantiation to reduce time between them
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user