Issue
I have recently written a Discord Bot in JDA. Because its a bot I´m only using on my Servers, I don´t need an dedicated Server for this, a Raspberry Pi is enough (yes I am aware of the low specs but they are enough for me).
So what I did then was installing Java on the Pi (I used Version 11 cause its the most recent one), copied my Botfiles to my Pi and started them by navigating into the folder I put them in and executing java -jar lxxrxtzBot.jar
. The Bot started up fine and I was able to use the commands - however not the MusicBot Commands. In the Bot I am using the Lavaplayer but if I start using my Play-Command the Bot either connects to my channel and plays nothing or connects and disconnects again after around 2 seconds.
However if I run the Bot on my Windows Computer everything works fine (I am executing this in cmd with java -jar lxxrxtzBot.jar
). If I use Musicbot-Commands while Bot hosted on my Windows PC the Bot doesnt disconnect - it simply plays the Music.
I am really wondering why that isn´t the case on my Pi 3B+ with Raspbian and I hope somebody can come up with a solution to my Problem.
Thanks for reading this, have a nice day ^^
Solution
Ah nvm everyone,
I've fixed it:
I've downloaded this libconnector.so file here. Then I went to my Bot-JAR File, right-clicked it and opened it with WinRAR. I opened the natives/linux-arm/ folder and pasted the libconnector.so file there.
Then I copied the modified .jar-File to my Pi 3B+ with Raspbian and executed it in the Terminal with java -jar lxxrxtzBot.jar
(Replace lxxrxtzBot
with your .jar-File Name)
Now everything works perfectly!
If you see this Thread cause you have the same problem, use this method ^^
Answered By - lxxrxtz Answer Checked By - Marilyn (WPSolving Volunteer)