I need the bot itself to exit the discord voice channel, I do not know how to do this, please help.
I tried to kick the bot using the ID, but I couldn't do it.
event.getChannel().asVoiceChannel().getGuild().kick(UserSnowflake.fromId(id));
I need the bot itself to exit the discord voice channel, I do not know how to do this, please help.
I tried to kick the bot using the ID, but I couldn't do it.
event.getChannel().asVoiceChannel().getGuild().kick(UserSnowflake.fromId(id));
Copyright © 2021 Jogjafile Inc.
Since you connected to the channel using
guild.getAudioManager().openAudioConnection(channel), the logical opposite is how you leave it withguild.getAudioManager().closeAudioConnection().