fix: add event handlers before joining call
This commit is contained in:
@@ -300,13 +300,7 @@ pub async fn handle(state: State, interaction: Interaction) {
|
|||||||
user_data_manager: state.user_data_manager,
|
user_data_manager: state.user_data_manager,
|
||||||
};
|
};
|
||||||
|
|
||||||
let call = state
|
let call = state.songbird.get_or_insert(guild_id);
|
||||||
.songbird
|
|
||||||
.join(guild_id, voice_channel_id)
|
|
||||||
.await
|
|
||||||
.expect("TODO");
|
|
||||||
tracing::error!(?call, "successfully joined");
|
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut call = call.lock().await;
|
let mut call = call.lock().await;
|
||||||
|
|
||||||
@@ -316,6 +310,13 @@ pub async fn handle(state: State, interaction: Interaction) {
|
|||||||
call.mute(true).await.expect("TODO");
|
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 channel_mention = format!("<#{voice_channel_id}>");
|
||||||
|
|
||||||
let info_mention = format!(
|
let info_mention = format!(
|
||||||
|
|||||||
Reference in New Issue
Block a user