fix: use existing node if someone is already in the voice channel

This commit is contained in:
Zomatree
2025-03-25 20:37:06 +00:00
parent 8b5e085232
commit 091aa4705b
4 changed files with 26 additions and 9 deletions

View File

@@ -104,6 +104,10 @@ pub async fn edit(
}
let new_voice_channel = if let Some(new_channel) = &data.voice_channel {
if !voice_client.is_enabled() {
return Err(create_error!(LiveKitUnavailable))
};
permissions.throw_if_lacking_channel_permission(ChannelPermission::MoveMembers)?;
// ensure the channel we are moving them to is in the server and is a voice channel