From db5ff0c3c4384c2071acefb1166fd567b11f9697 Mon Sep 17 00:00:00 2001 From: sclement Date: Thu, 28 Dec 2023 15:57:57 +0100 Subject: [PATCH] Make everithing syncrone to try to fix autovoice channel --- src/main/java/net/Broken/Tools/AutoVoiceChannel.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/Broken/Tools/AutoVoiceChannel.java b/src/main/java/net/Broken/Tools/AutoVoiceChannel.java index 632e8d5..0783683 100644 --- a/src/main/java/net/Broken/Tools/AutoVoiceChannel.java +++ b/src/main/java/net/Broken/Tools/AutoVoiceChannel.java @@ -47,11 +47,12 @@ public class AutoVoiceChannel { if (title.isEmpty()) { title = "Voice @count"; } - title = title.replace("@count", Integer.toString(next)); - newChannel.getManager().setName(title).setPosition(voiceChannel.getPosition()).queue(); - createdChannels.put(next, newChannel.getId()); + title = title.replace("@count", Integer.toString(next)); + newChannel.getManager().setName(title).setPosition(voiceChannel.getPosition()).complete(); moveMembers(voiceChannel.getMembers(), newChannel); + createdChannels.put(next, newChannel.getId()); + } } @@ -88,7 +89,7 @@ public class AutoVoiceChannel { restAction = restAction.and(destination.getGuild().moveVoiceMember(member, destination)); } if (restAction != null) { - restAction.queue(); + restAction.complete(); } }