Compare commits

..

2 Commits

Author SHA1 Message Date
sclement
2586a84755 Fix wrong chanel select 2023-12-28 17:08:31 +01:00
sclement
7478f68eef Try to fix position 2023-12-28 17:04:28 +01:00

View File

@ -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(newChannel)
.moveBelow(voiceChannel).queue();
moveMembers(voiceChannel.getMembers(), (AudioChannel) newChannel);
createdChannels.put(next, newChannel.getId());
});