mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-10-31 08:32:18 +01:00
Fix GUILD_MEMBERS intent not getting auto enabled
This commit is contained in:
parent
1586fcb927
commit
6de141ea1d
@ -311,10 +311,8 @@ public class JDAConnectionManager implements DiscordConnectionManager {
|
||||
MemberCachingConfig memberCachingConfig = discordSRV.config().memberCaching;
|
||||
DiscordConnectionDetailsImpl connectionDetails = discordSRV.discordConnectionDetails();
|
||||
|
||||
Set<GatewayIntent> intents = new LinkedHashSet<>();
|
||||
this.intents.clear();
|
||||
this.intents.addAll(connectionDetails.getGatewayIntents());
|
||||
this.intents.forEach(intent -> intents.add(intent.asJDA()));
|
||||
|
||||
Set<CacheFlag> cacheFlags = new LinkedHashSet<>();
|
||||
this.cacheFlags.clear();
|
||||
@ -323,7 +321,7 @@ public class JDAConnectionManager implements DiscordConnectionManager {
|
||||
cacheFlags.add(flag.asJDA());
|
||||
DiscordGatewayIntent intent = flag.requiredIntent();
|
||||
if (intent != null) {
|
||||
intents.add(intent.asJDA());
|
||||
this.intents.add(intent);
|
||||
}
|
||||
});
|
||||
|
||||
@ -355,6 +353,9 @@ public class JDAConnectionManager implements DiscordConnectionManager {
|
||||
chunkingFilter = ChunkingFilter.NONE;
|
||||
}
|
||||
|
||||
Set<GatewayIntent> intents = new LinkedHashSet<>();
|
||||
this.intents.forEach(intent -> intents.add(intent.asJDA()));
|
||||
|
||||
// Start with everything disabled & enable stuff that we actually need
|
||||
JDABuilder jdaBuilder = JDABuilder.createLight(token, intents);
|
||||
jdaBuilder.enableCache(cacheFlags);
|
||||
|
Loading…
Reference in New Issue
Block a user