cerus / jda-slash-commands

Slash commands (and message components) for JDA
GNU General Public License v3.0
15 stars 3 forks source link

initCommands crashes the example. #3

Closed VingGit closed 3 years ago

VingGit commented 3 years ago

like so:

Caused by: java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)' at de.cerus.jdasc.http.DiscordHttpClient.submitGlobalCommand(DiscordHttpClient.java:127) at de.cerus.jdasc.JDASlashCommands.submitGlobalCommand(JDASlashCommands.java:159) at Botti.Botti.initCommands(Botti.java:54) at Botti.Botti.launchBot(Botti.java:42) at GUI.ControllerForLogin.login(ControllerForLogin.java:41) ... 62 more

and when you comment it out, it works just fine.

here's the repo with the most up to date branch: https://github.com/VingGit/UnicaBot/tree/gui-jatkokehitys

i'm unsure whether the problem is on my end or yours,(prolly mine tho) but i seem to have struck a wall once more.

VingGit commented 3 years ago

`

com.squareup.okhttp3
        <artifactId>okhttp</artifactId>
        <version>4.9.1</version>
    </dependency>`

nvm, just updated the pom

VingGit commented 3 years ago

and now it works like a charm!

ps: i suggest you include that in your maven setup