Dieser Commit ist enthalten in:
Ursprung
0bab12ed6c
Commit
54bdee79dc
@ -97,20 +97,18 @@ public class ChannelManager extends ListenerAdapter {
|
||||
return Integer.compare(i1, i2);
|
||||
});
|
||||
|
||||
if (channels.isEmpty()) {
|
||||
ChannelAction<VoiceChannel> channelAction = guild.createVoiceChannel(channelNames.get(0))
|
||||
.setParent(guild.getCategoryById(options.categoryID));
|
||||
if (options.channelCreator != null) {
|
||||
options.channelCreator.accept(channelAction);
|
||||
for (int i = channels.size() - 1; i >= 0; i--) {
|
||||
VoiceChannel channel = channels.get(i);
|
||||
if (channel.getMembers().isEmpty()) {
|
||||
channel.delete().queue();
|
||||
channels.remove(i);
|
||||
}
|
||||
VoiceChannel newChannel = channelAction.complete();
|
||||
channels.add(newChannel);
|
||||
return;
|
||||
}
|
||||
|
||||
if (channels.size() == 1) {
|
||||
// TODO: Check if channel is not empty and create new channel
|
||||
if (channels.size() == options.maxChannels) {
|
||||
return;
|
||||
}
|
||||
createChannelWithIndex(channels.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren