MIA
⛺ Moonlink.js - Imagine a Music Applicatiommetropolitan-bronze
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
metropolitan-bronze•126d ago
my code
index.js
1Lucas1.apk•126d ago
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.
metropolitan-bronze•125d ago
Okay, no problem, I actually fixed some of this, by doing this
metropolitan-bronze•125d ago
metropolitan-bronze•125d ago
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
metropolitan-bronze•125d ago
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
adverse-sapphire•125d ago
GG @Aertic, you just advanced to level 1!
metropolitan-bronze•125d ago
nvm it seems to back to the payload error for some reason
1Lucas1.apk•125d ago
Could you send me the error?
metropolitan-bronze•125d ago
Same one
Payload position
I got this when my song ended, didnt get to play a second one
1Lucas1.apk•125d ago
I published a new version, see if the error still exists?
metropolitan-bronze•124d ago
hey, sorry for the delay, tried to play a song got this
1Lucas1.apk•124d ago
Could you copy and paste the error here in the chat?
I need the characters to fix them in Parse
.
metropolitan-bronze•124d ago
{"op":"playerUpdate","state":{"time":1705336897068,"position":0,"connected":true,"ping":0},"guildId":"1131195718896455841"}�{{"
here
should be sufficient
1Lucas1.apk•124d ago
Yes, thank you
I will fix it
metropolitan-bronze•124d ago
thanks
1Lucas1.apk•124d ago
@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
metropolitan-bronze•123d ago
Ok, il test it later today
Works
thank you so much
would you mind telling how to pause music or loop it and stuff?
adverse-sapphire•123d ago
GG @Aertic, you just advanced to level 2!
1Lucas1.apk•123d ago
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 🙂
metropolitan-bronze•123d ago
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
1Lucas1.apk•123d ago
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
metropolitan-bronze•122d ago
Ok, thanks
And is there a dynamic autoplay toggle?
So i dont need to define it on player creation
1Lucas1.apk•122d ago
It has setAutoPlay in the player
metropolitan-bronze•118d ago
thanks
just a quick question, can I somehow add support for more streaming platforms? or are all of them included by default
1Lucas1.apk•118d ago
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
1Lucas1.apk•118d ago
1Lucas1.apk•118d ago
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
1Lucas1.apk•118d ago
metropolitan-bronze•118d ago
okay, thank you so much :D
Want results from more Discord servers?
More Postserror(node:6856) [DEP0128] DeprecationWarning: Invalid 'main' field in 'G:\k\node_modules\moonlink.js\disthere is code in the package that console.log(queue)this code is so annoyingEror when playing song with deezerMusic not playing but connectingHey there! My music doesn't play when connecting. I think it's because I do not have a raw event. I'In debug, connected is falseThe bot is connected but the music is not playing, I saw the debug and found thisnão tem skip nas docs e fica dando erro de Node mesmo conectandoe issomodule errorsometimes this error pops up while using play comand