File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/de/progen_bot/core Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 21
21
import net .dv8tion .jda .api .JDA ;
22
22
import net .dv8tion .jda .api .JDABuilder ;
23
23
import net .dv8tion .jda .api .requests .GatewayIntent ;
24
+ import net .dv8tion .jda .api .utils .MemberCachePolicy ;
25
+ import net .dv8tion .jda .api .utils .cache .CacheFlag ;
24
26
import okhttp3 .OkHttpClient ;
25
27
26
28
import javax .security .auth .login .LoginException ;
@@ -154,7 +156,13 @@ private static void initJDA() {
154
156
GatewayIntent .GUILD_PRESENCES ,
155
157
GatewayIntent .GUILD_MESSAGE_REACTIONS ,
156
158
GatewayIntent .DIRECT_MESSAGE_REACTIONS ,
157
- GatewayIntent .DIRECT_MESSAGES );
159
+ GatewayIntent .DIRECT_MESSAGES
160
+ )
161
+ .enableCache (
162
+ CacheFlag .ACTIVITY
163
+ )
164
+ .setMemberCachePolicy (MemberCachePolicy .ALL );
165
+
158
166
159
167
BuildManager .addEventListeners (builder );
160
168
try {
You can’t perform that action at this time.
0 commit comments