forked from jmug/stoatchat
fix: dont break on user not still being in channel and force disconnecting
This commit is contained in:
@@ -48,9 +48,10 @@ pub async fn remove_member(
|
||||
};
|
||||
|
||||
if is_in_voice_channel(&user.id, channel.id()).await? {
|
||||
let node = get_channel_node(channel.id()).await?.unwrap();
|
||||
if let Some(node) = get_channel_node(channel.id()).await? {
|
||||
let _ = voice_client.remove_user(&node, &user.id, channel.id()).await;
|
||||
}
|
||||
|
||||
voice_client.remove_user(&node, &user.id, channel.id()).await?;
|
||||
delete_voice_state(channel.id(), None, &user.id).await?;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user