I've tried to make a bot that sends a message when a user joins a voice call. It doesn't show any error message, but it doesn't work. Here is my code:
package listeners;
import net.dv8tion.jda.api.events.guild.voice.GuildVoiceJoinEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
public class voiceListener extends ListenerAdapter {
@Override
public void onGuildVoiceJoin(GuildVoiceJoinEvent event){
event.getGuild().getTextChannelById("885172885797343317").sendMessage(event.getVoiceState() + "joined voice channel" + event.getChannelJoined() + ".").queue();
}
}
The main method is right I guess because another listener works.