using shading on the Jar

switched to Discord4j instead of JDA
getEventDispatcher() not working
NEW be04 version
This commit is contained in:
nzBryce101
2024-04-23 00:32:35 +12:00
parent dd21b58774
commit 7d30515539
13 changed files with 159 additions and 94 deletions

98
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.example</groupId>
<artifactId>MCdiscord_bot</artifactId>
<version>1.1be02</version>
<version>1.1be04</version>
<packaging>jar</packaging> <!-- Specify the correct packaging type here -->
<properties>
@@ -33,12 +33,6 @@
<url>https://jcenter.bintray.com</url>
</repository>
<repository>
<id>discordJDA</id>
<name>JDA for Discord</name>
<url>https://github.com/DV8FromTheWorld/JDA</url>
</repository>
</repositories>
<dependencies>
@@ -55,29 +49,14 @@
<version>1.20.4</version>
<scope>provided</scope>
</dependency>
<!--(Java Discord API) with JFlac and Tritonus-dsp -->
<dependency>
<!-- https://mvnrepository.com/artifact/net.dv8tion/JDA -->
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-alpha.4</version><!-- Update version to the latest stable version -->
<exclusions>
<exclusion>
<groupId>jflac</groupId>
<artifactId>jflac</artifactId>
</exclusion>
<exclusion>
<groupId>tritonus</groupId>
<artifactId>tritonus-dsp</artifactId>
</exclusion>
<exclusion>
<groupId>club.minnced</groupId>
<artifactId>opus-java</artifactId>
</exclusion>
</exclusions>
<scope>compile</scope>
<!--(Java Discord API) -->
<dependency>
<groupId>com.discord4j</groupId>
<artifactId>discord4j-core</artifactId>
<version>3.3.0-RC1</version>
</dependency>
<!-- Logging-->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
@@ -104,46 +83,33 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version> <!-- Adjust version as needed -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version> <!-- Use the latest version -->
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
</includes>
</resource>
</resources>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>disMCbot</mainClass>
</manifest>
<manifestEntries>
<Class-Path>.</Class-Path>
</manifestEntries>
</archive>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${project.artifactId}-${project.version}</finalName>
<includes>
<include>plugin.yml</include>
</includes>
<artifactSet>
<includes>
<include>club.minced.discord4j</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>club.minced</pattern>
<shadedPattern>com.example.MCdiscordbot.shaded.club.minced</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</execution>
</executions>
</plugin>
</plugins>
</build>