Reputation: 51
I'm new to the Java Discord API, and I'm trying to run functions when users join. According to the javadocs, you need to enable the GatewayIntent GUILD_MEMBERS, which is disabled by default, but when I run the bot with JDABuilder#enableIntents(GatewayIntent.GUILD_MEMBERS); I get an error code.
CloseCode(4014 / Disallowed intents. Your bot might not be eligible to request a privileged intent such as GUILD_PRESENCES or GUILD_MEMBERS.)
Upvotes: 2
Views: 8512
Reputation: 6134
From the JDA Troubleshooting Guide:
This means you tried to use GatewayIntent.GUILD_MEMBERS or GatewayIntent.GUILD_PRESENCES without enabling it in your application dashboard. To use these privileged intents you first have to enable them.
If you use these intents you are limited to 100 guilds on your bot. To allow the bot to join more guilds while using this intent you have to verify your bot. This will be available in your application dashboard when the bot joins at least 75 guilds.
Upvotes: 6