Make everithing syncrone to try to fix autovoice channel

This commit is contained in:
sclement 2023-12-28 15:57:57 +01:00
parent 77b32c7e93
commit db5ff0c3c4

View File

@ -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();
}
}