diff --git a/src/main/java/net/Broken/BotListener.java b/src/main/java/net/Broken/BotListener.java index 43eb445..c38990f 100644 --- a/src/main/java/net/Broken/BotListener.java +++ b/src/main/java/net/Broken/BotListener.java @@ -156,6 +156,7 @@ public class BotListener extends ListenerAdapter { super.onGuildVoiceMove(event); AutoVoiceChannel autoVoiceChannel = AutoVoiceChannel.getInstance(event.getGuild()); autoVoiceChannel.leave(event.getChannelLeft()); + autoVoiceChannel.join(event.getChannelJoined()); } @Override diff --git a/src/main/java/net/Broken/Tools/AutoVoiceChannel.java b/src/main/java/net/Broken/Tools/AutoVoiceChannel.java index ae40b3c..7baf78b 100644 --- a/src/main/java/net/Broken/Tools/AutoVoiceChannel.java +++ b/src/main/java/net/Broken/Tools/AutoVoiceChannel.java @@ -57,6 +57,7 @@ public class AutoVoiceChannel { if (entry.getValue().equals(id)) { logger.info("Auto created channel is empty, deleting it ..."); voiceChannel.delete().reason("Auto-remove empty voice channel").queue(); + createdChannels.remove(entry.getKey()); } } }