Fix issue if auto voice channel title is not defined

This commit is contained in:
SebClem 2021-03-06 16:14:33 +01:00
parent 74f8fb2306
commit eb0c1cf083

View File

@ -41,6 +41,9 @@ public class AutoVoiceChannel {
VoiceChannel newChannel = voiceChannel.createCopy().complete();
int next = getNextNumber();
String title = pref.getAutoVoiceChannelTitle();
if (title.isEmpty()){
title = "Voice @count";
}
title = title.replace("@count", Integer.toString(next));
newChannel.getManager().setName(title).setPosition(voiceChannel.getPosition()).queue();