v0.1.2 - Updated CacheFlags

This commit is contained in:
2023-01-22 09:11:59 -05:00
parent b86dd6af87
commit cc25dbe159
2 changed files with 18 additions and 5 deletions

13
pom.xml
View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.bensherriff</groupId>
<artifactId>siren</artifactId>
<version>0.1.1</version>
<version>0.1.2</version>
<packaging>jar</packaging>
<repositories>
@@ -43,6 +43,13 @@
<url>https://repo.local.bensherriff.com/artifactory/libs-snapshot</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>central</id>
<name>ffc58a58b429-releases</name>
<url>http://repo.local.bensherriff.com/artifactory/libs-release</url>
</repository>
</distributionManagement>
<properties>
<jda.version>4.4.0_350</jda.version>
@@ -120,8 +127,8 @@
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>All</shadedClassifierName>
<!-- <shadedArtifactAttached>true</shadedArtifactAttached>-->
<!-- <shadedClassifierName>All</shadedClassifierName>-->
<artifactSet>
<includes>
<include>*:*</include>

View File

@@ -33,6 +33,12 @@ public class MusicBot extends ListenerAdapter {
GatewayIntent.DIRECT_MESSAGES, GatewayIntent.GUILD_MESSAGES, GatewayIntent.GUILD_MESSAGE_REACTIONS,
GatewayIntent.GUILD_VOICE_STATES
};
private final static CacheFlag[] ENABLED_FLAGS = {
CacheFlag.MEMBER_OVERRIDES, CacheFlag.VOICE_STATE
};
private final static CacheFlag[] DISABLED_FLAGS = {
CacheFlag.ACTIVITY, CacheFlag.CLIENT_STATUS, CacheFlag.EMOTE, CacheFlag.ONLINE_STATUS
};
private final PlayerManager playerManager;
private final Map<Long, AudioHandler> musicManagers;
private final Settings settings;
@@ -49,8 +55,8 @@ public class MusicBot extends ListenerAdapter {
MusicBot musicBot = new MusicBot(settings);
JDA jda = JDABuilder.create(settings.getToken(), Arrays.asList(INTENTS))
.enableCache(CacheFlag.MEMBER_OVERRIDES, CacheFlag.VOICE_STATE)
.disableCache(CacheFlag.ACTIVITY, CacheFlag.CLIENT_STATUS, CacheFlag.EMOTE)
.enableCache(Arrays.asList(ENABLED_FLAGS))
.disableCache(Arrays.asList(DISABLED_FLAGS))
.addEventListeners(musicBot)
.setBulkDeleteSplittingEnabled(true)
.build();