Error when searching for a song
Hey there! Im getting this very weird error when trying to play a simple song, I copied the example in the docs so far, only adjusted it a bit for my bots structure
30 Replies
my code
index.js
Hello, thank you very much for reporting the bug, it seems that a property is not working as expected, I will fix it and publish a new version correcting this error
I apologize for the delay in responding, I'm not feeling very well these days.
Okay, no problem, I actually fixed some of this, by doing this
So that solves my first issue but not the .setPosition one
If you dont mind I would suggest an update to the docs, and maybe to the function itsself, as it says the 'search' parameter but in reality you pass the query parameter
Thanks for updating the lib, I tested it and it works now yay! however when the song finishes, I get this error? Not sure if its an issue on my end but doesnt look like it
GG @Aertic, you just advanced to level 1!
nvm it seems to back to the payload error for some reason
Could you send me the error?
Same one
Payload position
I got this when my song ended, didnt get to play a second one
I published a new version, see if the error still exists?
hey, sorry for the delay, tried to play a song got this
Could you copy and paste the error here in the chat?
I need the characters to fix them in Parse
.
{"op":"playerUpdate","state":{"time":1705336897068,"position":0,"connected":true,"ping":0},"guildId":"1131195718896455841"}�{{"
here
should be sufficient
Yes, thank you
I will fix it
thanks
@Aertic Could you do the test to see if it's corrected now? Because I did the analysis on my end and it worked, but the code sometimes gives false alarms on my end
Ok, il test it later today
Works
thank you so much
would you mind telling how to pause music or loop it and stuff?
GG @Aertic, you just advanced to level 2!
The pause is
For loop
If the value is 1 it will repeat the track that is playing, if it is 2 it will repeat the queue
@Aertic
I hope I helped :), if you have any other questions, just ask 🙂
okay
thanks
are all these actions written somewhere?
and how can I fetch the player from a different file? Lets say ive got a pause command inside a different file than the play command, and need to pause
The player can be obtained using the players class
For example
This way you get a guild player
Then you can assign this value to let player
And use the functions
I'm going to make some wikis on the documentation, because it's very raw
Ok, thanks
And is there a dynamic autoplay toggle?
So i dont need to define it on player creation
It has setAutoPlay in the player
thanks
just a quick question, can I somehow add support for more streaming platforms? or are all of them included by default
Hello, this is by default from lavalink, it only supports SoundCloud, YouTube Music, YouTube, and other types of streams such as http
For platforms like Spotify, Deezer, Apple Music, and other external platforms, a lavalink collaborator has a plugin called lavaSrc
Setting it up is very simple
In application.yml
You add the plugin
That lavalink will automatically download
Configure the plugin
By filling in the information
And putting true in the ones you want
There's my clientId and clientSecret 🙂
Then it looks like this
okay, thank you so much :D