diff --git a/.gitignore b/.gitignore index 58ec636..20b9ca0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ token.txt +app.jar target/ !.mvn/wrapper/maven-wrapper.jar diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9e4fc41 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM eclipse-temurin:17 + +RUN mkdir -p /opt/duke-syndicate/duke-bot +COPY target/untitled-1.0-SNAPSHOT.jar /opt/duke-syndicate/duke-bot/app.jar +COPY target/final /opt/duke-syndicate/duke-bot + +WORKDIR /opt/duke-syndicate/duke-bot + +CMD ["java", "-jar", "/opt/duke-syndicate/duke-bot/app.jar"] \ No newline at end of file diff --git a/pom.xml b/pom.xml index 59156cc..3d46e19 100644 --- a/pom.xml +++ b/pom.xml @@ -22,4 +22,41 @@ 5.0.0-beta.21 + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-dependencies + package + + copy-dependencies + + + ${project.build.directory}/final/libraries/ + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + true + libraries/ + hard.rock.Main + + + + + + \ No newline at end of file diff --git a/src/main/java/hard/rock/Main.java b/src/main/java/hard/rock/Main.java index 5edd9fc..396823b 100644 --- a/src/main/java/hard/rock/Main.java +++ b/src/main/java/hard/rock/Main.java @@ -8,7 +8,7 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; public class Main { - public static void main(String[] args) throws IOException { + public static void main(String[] args) throws IOException, InterruptedException { String token = new String(Main.class.getResourceAsStream("/token.txt").readAllBytes(), StandardCharsets.UTF_8); JDABuilder builder = JDABuilder.createDefault(token)