diff --git a/pom.xml b/pom.xml
index b9bc8e9..44fe7f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
net.dv8tion
JDA
- 4.2.0_181
+ 4.2.0_204
com.jagrosh
diff --git a/src/main/java/com/jagrosh/vortex/Constants.java b/src/main/java/com/jagrosh/vortex/Constants.java
index 67ced9e..d2f213e 100644
--- a/src/main/java/com/jagrosh/vortex/Constants.java
+++ b/src/main/java/com/jagrosh/vortex/Constants.java
@@ -16,7 +16,9 @@
package com.jagrosh.vortex;
import java.time.OffsetDateTime;
+import java.util.EnumSet;
import net.dv8tion.jda.api.Permission;
+import net.dv8tion.jda.api.requests.GatewayIntent;
/**
*
@@ -39,6 +41,9 @@
Permission.MESSAGE_WRITE,Permission.MESSAGE_EMBED_LINKS, Permission.MESSAGE_HISTORY, Permission.MESSAGE_EXT_EMOJI,
Permission.MESSAGE_MANAGE, Permission.VOICE_CONNECT, Permission.VOICE_MOVE_OTHERS, Permission.VOICE_DEAF_OTHERS,
Permission.VOICE_MUTE_OTHERS, Permission.NICKNAME_CHANGE, Permission.NICKNAME_MANAGE, Permission.VIEW_AUDIT_LOGS};
+ public final static EnumSet INTENTS = EnumSet.of(GatewayIntent.DIRECT_MESSAGES, GatewayIntent.GUILD_BANS, GatewayIntent.GUILD_INVITES,
+ GatewayIntent.GUILD_MEMBERS, GatewayIntent.GUILD_MESSAGES, GatewayIntent.GUILD_MESSAGE_REACTIONS,
+ GatewayIntent.GUILD_PRESENCES, GatewayIntent.GUILD_VOICE_STATES);
public final static String SERVER_INVITE = "https://discord.gg/0p9LSGoRLu6Pet0k";
//public final static String BOT_INVITE = "https://discordapp.com/oauth2/authorize?client_id=240254129333731328&scope=bot&permissions="+Permission.getRaw(PERMISSIONS);
// public final static String BOT_INVITE = "https://discordapp.com/oauth2/authorize?client_id=169463754382114816&scope=bot&permissions="+Permission.getRaw(PERMISSIONS);
diff --git a/src/main/java/com/jagrosh/vortex/Vortex.java b/src/main/java/com/jagrosh/vortex/Vortex.java
index 5b2eac6..f20488b 100644
--- a/src/main/java/com/jagrosh/vortex/Vortex.java
+++ b/src/main/java/com/jagrosh/vortex/Vortex.java
@@ -188,17 +188,14 @@
//.setCarbonitexKey(config.getString("listing.carbon"))
.build();
MessageAction.setDefaultMentions(Arrays.asList(Message.MentionType.EMOTE, Message.MentionType.CHANNEL));
- shards = new DefaultShardManagerBuilder()
+ shards = DefaultShardManagerBuilder.createDefault(config.getString("bot-token"), Constants.INTENTS)
.setShardsTotal(config.getInt("shards-total"))
- .setToken(config.getString("bot-token"))
.addEventListeners(new Listener(this), client, waiter)
.setStatus(OnlineStatus.DO_NOT_DISTURB)
.setActivity(Activity.playing("loading..."))
.setBulkDeleteSplittingEnabled(false)
.setRequestTimeoutRetry(true)
- .setDisabledCacheFlags(EnumSet.of(CacheFlag.EMOTE, CacheFlag.ACTIVITY)) //TODO: dont disable GAME
- .setSessionController(new BlockingSessionController())
-
+ .disableCache(CacheFlag.EMOTE, CacheFlag.ACTIVITY)
.build();
modlog.start();