Closed Mr-Hunter01 closed 2 years ago
Can't see anything immediately wrong, however I would advise you attach some event listeners in your code, to listen for Track events. There's a possibility the track might be getting stuck, or encountering an exception.
Also, I noticed that endTime
is being sent with a value of zero. Not sure if this is a contributing factor, but to rule this out as an issue I would suggest changing await player.play()
to await player.play(end_time=None)
Also update your Lavalink build. 1.3.98-devoxin
-- yours is about 3 months out of date and I haven't maintained my Lavaplayer fork for a while yet. Grab 3.5-rc2 here.
I have created a lavalink server on replit instead of creating a one on my computer, run exactly the same code and it worked, it played the music i requested. But when i create a server on my computer it gets the request but doesn't play anything.
Here is the Lavalink logs(I updated it to version 3.5-rc2):
2022-08-06 13:51:52.327 INFO 6800 --- [ XNIO-1 task-1] lavalink.server.io.SocketServer : Connection successfully established from WaveLink 2022-08-06 13:51:52.337 INFO 6800 --- [ XNIO-1 I/O-8] lavalink.server.io.SocketServer : {"op": "configureResuming", "key": "a2b9b6cbb67bd7f9", "timeout": 60} 2022-08-06 13:52:04.883 INFO 6800 --- [ XNIO-1 task-1] l.server.player.AudioLoaderRestHandler : Got request to load for identifier "ytsearch:infraction cyber attac" 2022-08-06 13:52:05.703 INFO 6800 --- [ader-2-thread-1] lavalink.server.player.AudioLoader : Loaded playlist Search results for: infraction cyber attac 2022-08-06 13:52:05.720 INFO 6800 --- [ XNIO-1 I/O-8] lavalink.server.io.SocketServer : {"op": "play", "guildId": "688120304429694985", "track": "QAAAyQIAUEN5YmVycHVuayAyMDc3IGJ5IEluZnJhY3Rpb24gW05vIENvcHlyaWdodCBNdXNpY10gW 0ZyZWUgRG93bmxvYWRdIC8gQ3liZXIgQXR0YWNrAB9JbmZyYWN0aW9uIC0gTm8gQ29weXJpZ2h0IE11c2ljAAAAAAADMGgAC0FOTTF0VUJTWFFvAAEAK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9QU5NMXRVQlNYUW8AB3lvdXR1YmUAAAAAAAAAAA==", "noReplace": false, "startTime": "0"} 2022-08-06 13:52:05.727 INFO 6800 --- [ XNIO-1 task-1] l.server.player.AudioLoaderRestHandler : GET /decodetrack 2022-08-06 13:52:05.727 WARN 6800 --- [back-1-thread-1] c.s.d.l.s.y.YoutubeAccessTokenTracker : YouTube auth tokens can't be retrieved because email and password is not set in YoutubeAudioSourceManager, age restricted videos will t hrow exceptions. 2022-08-06 13:52:06.320 INFO 6800 --- [ XNIO-1 I/O-8] lavalink.server.io.SocketServer : {"op": "voiceUpdate", "guildId": "688120304429694985", "sessionId": "e0328f2dea6d2940fc66997e88a9cb30", "event": {"token": "612a87e3e56 9df08", "guild_id": "688120304429694985", "endpoint": "rotterdam204.discord.media:443"}} 2022-08-06 13:55:35.612 INFO 6800 --- [ XNIO-1 task-1] l.server.player.AudioLoaderRestHandler : GET /decodetrack
@Devoxin I started the server on a linux virtual machine and started the bot on windows and the problem solved. You were right the track was getting stuck because of i'm starting server and the bot on the same machine. Had the same issue a while ago on a messaging app project. Thank you and sorry for taking your time for a simple problem like that.
same issue here, but with discord.js
Also my bot same issue not hearing any sounds this happend some guilds
Without logs we can only guess
What I noticed in OP's logs is "endTime": "0",
This might be the problem here
Looking closer in lavalinks code this looks fine actually
Nevertheless saying same is just useless and doesn't provide any info for us
OP replied their issue was a case of the track getting stuck. I'm going to assume it's a similar case for anyone else tagging on to this issue, but as already stated nothing can be done without logs. I'm going to go ahead and close this issue.
Should anyone want to follow up on this for an identical issue, please join the Discord server (preferred) or create a new issue to better help us keep track of issues.
Description
I've created a discord music bot with lavalink but im having issues when i'm trying to play audio. When i try to list tracks it perfectly lists them but when i try to select one to play, it doesn`t play it just nothing happens.
Version info
I'm using lavalink interface written by Devoxin (version 3.1.7) and the latest version of lavalink.jar
Output of
java -version
:Lavalink Logs:
And i'd like to share my code (in case you need it):