Check the user Voice Channel status in Java

792 Views Asked by At

In JavaScript, checking if the user's voice channel status would be:

(if the user is in a voice channel or not)

let voiceChannel = message.member.voice.channel;

if (vocalChannel) {
    [...]
}

For Java, I don't see something similar in the JDA GitHub documentation.

However, I can use GuildVoiceJoinEvent to detect each member who connects to a voice channel but it would consume more CPU resources for sure. Is there any other solution at the moment?

0

There are 0 best solutions below