File tree 1 file changed +8
-1
lines changed
src/main/java/net/clementraynaud/skoice/bot
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 21
21
22
22
import net .clementraynaud .skoice .Skoice ;
23
23
import net .clementraynaud .skoice .storage .config .ConfigField ;
24
- import net .clementraynaud .skoice .tasks .InterruptSystemTask ;
25
24
import net .dv8tion .jda .api .Permission ;
26
25
import net .dv8tion .jda .api .entities .Member ;
27
26
import net .dv8tion .jda .api .entities .PermissionOverride ;
@@ -44,6 +43,14 @@ public void setup(VoiceChannel channel, User user) {
44
43
this .plugin .getConfigYamlFile ().set (ConfigField .VOICE_CHANNEL_ID .toString (), channel .getId ());
45
44
if (oldVoiceChannel != null ) {
46
45
oldVoiceChannel .modifyStatus ("" ).queue ();
46
+ }
47
+
48
+ if (this .plugin .getBot ().getStatus () == BotStatus .READY ) {
49
+ this .plugin .getBot ().getVoiceChannel ().notifyUnlinkedUsers ();
50
+ this .plugin .getBot ().getVoiceChannel ().setStatus ();
51
+ this .plugin .getBot ().getVoiceChannel ().updatePermissions ();
52
+ this .plugin .getBot ().updateVoiceState ();
53
+ } else {
47
54
this .plugin .getListenerManager ().update (user );
48
55
}
49
56
}
You can’t perform that action at this time.
0 commit comments