Certain URLs Not Working
Starting today I've noticed an issue where 'query' is undefined, specifically in the loadTracks() function.
if (query.startsWith("http://") || query.startsWith("https://"))
^
TypeError: Cannot read properties of undefined (reading 'startsWith')
at \nodemodules\moonlink.js\dist\src\entities\Rest.js:23:23
This occurs when a YouTube link like https://www.youtube.com/watch?v=__ , https://youtu.be/___ , soundcloud.com, and deezer.com links
Links work perfectly fine although from bandcamp.com or spotify.com
I use this in my play.js to test URLs to make sure they're ok,
and search and load everything through
in Rest.js specifically, logging the value of
query
returns undefined
in these cases.
Does anybody have a clue as to what's going on? I'm new to Moonlink so I'm still a bit limited in what I know of it. Thank youSolution:Jump to solution
```
let req;
if (isLink) {
req = await client.manager.search({ query });
} else {...
3 Replies
good morning.
good afternoon
good night :)
in v4 you hear a change
Solution
provincial-silverOP•8mo ago
Worked perfectly, thank you so much!