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