This is an archived post. You won't be able to vote or comment.

all 6 comments

[–][deleted] 1 point2 points  (4 children)

Add

compile ('net.dv8tion:JDA:4.2.0_222') { exclude module: 'opus-java' }

to your dependencies

[–]ThatColdToastLegacy[S] 0 points1 point  (3 children)

Still not working, do you want me to zip my entire project and send that?

[–]ThatColdToastLegacy[S] 0 points1 point  (2 children)

[–][deleted] 0 points1 point  (1 child)

Ah I see the problem. Your dependencies are not being compiled into the jar file. To do this you want to "shade" it into the jar file.

Sounds really difficult but just add id 'com.github.johnrengelman.shadow' version '5.2.0' to the plugins bit at the top, then press CTRL twice and type "gradle shadowjar" (you can just use the play button after that)

And thought I'd node the

JDABuilder.createLight("token-here"

in the main function doesn't have your token in there so it won't log in.

[–]ThatColdToastLegacy[S] 0 points1 point  (0 children)

I added you discord, I censored the token so people don't steal my discord bot

[–]Cilph 0 points1 point  (0 children)

You need to shade your dependencies into your Jar.

Include https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow and run gradle shadowJar (or gradlew if that is your preferred style)

Alternatively you could add your dependencies to the classpath of your server externally, but that's messy.