Try to fix position

This commit is contained in:
sclement 2023-12-28 17:04:28 +01:00
parent db70d06dc4
commit 7478f68eef

View File

@ -47,7 +47,9 @@ public class AutoVoiceChannel {
title = "Voice @count"; title = "Voice @count";
} }
title = title.replace("@count", Integer.toString(next)); 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); moveMembers(voiceChannel.getMembers(), (AudioChannel) newChannel);
createdChannels.put(next, newChannel.getId()); createdChannels.put(next, newChannel.getId());
}); });