Skip to content

Commit

Permalink
Implement ChacheFlag and MemberCachePolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
ShowMeYourSkil authored Jan 7, 2021
1 parent a76bd5d commit e25020d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/de/progen_bot/core/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.MemberCachePolicy;
import net.dv8tion.jda.api.utils.cache.CacheFlag;
import okhttp3.OkHttpClient;

import javax.security.auth.login.LoginException;
Expand Down Expand Up @@ -154,7 +156,13 @@ private static void initJDA() {
GatewayIntent.GUILD_PRESENCES,
GatewayIntent.GUILD_MESSAGE_REACTIONS,
GatewayIntent.DIRECT_MESSAGE_REACTIONS,
GatewayIntent.DIRECT_MESSAGES);
GatewayIntent.DIRECT_MESSAGES
)
.enableCache(
CacheFlag.ACTIVITY
)
.setMemberCachePolicy(MemberCachePolicy.ALL);


BuildManager.addEventListeners(builder);
try {
Expand Down

0 comments on commit e25020d

Please sign in to comment.