From 7478f68eef5514507e92585d69d4a7da811a115a Mon Sep 17 00:00:00 2001 From: sclement Date: Thu, 28 Dec 2023 17:04:28 +0100 Subject: [PATCH] Try to fix position --- src/main/java/net/Broken/Tools/AutoVoiceChannel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/Broken/Tools/AutoVoiceChannel.java b/src/main/java/net/Broken/Tools/AutoVoiceChannel.java index 90cfb80..bb9691d 100644 --- a/src/main/java/net/Broken/Tools/AutoVoiceChannel.java +++ b/src/main/java/net/Broken/Tools/AutoVoiceChannel.java @@ -47,7 +47,9 @@ public class AutoVoiceChannel { title = "Voice @count"; } title = title.replace("@count", Integer.toString(next)); - voiceChannel.createCopy().setName(title).setPosition(voiceChannel.getPosition()).queue(newChannel -> { + voiceChannel.createCopy().setName(title).queue(newChannel -> { + voiceChannel.getGuild().modifyVoiceChannelPositions().selectPosition(voiceChannel) + .moveBelow(voiceChannel).queue(); moveMembers(voiceChannel.getMembers(), (AudioChannel) newChannel); createdChannels.put(next, newChannel.getId()); });