Closed pgamerx closed 3 years ago
I have no trouble getting the info with exactly the same link, have you tried the getTracks method ?
Yep ! It gives error saying couldn't parse it or something
have you checked if args[0] gets the given link in full or if it's not set to lowercase ?
I checked It gives link only Problem is it works on https://runkit.com but not in my bot
args[0] is not in lowercase ? console.log to be sure
I did It's in lowercase
that's why you got an error, links are case sensitive
Ohhhh Lemme try it without changing it to lowercase
I tried ! Didn't work either
message.channel.send(`Searching for song ! We don't support spotify directly`)
const args22 = message.content.slice(prefix.length).trim().split(/ +/g);
const song = await getPreview(args22)
const songname = song.title
const search = await distube.search(songname)
const firststep = search[0].url
return distube.play(message, firststep)
My code
Error: Couldn't parse play as valid URL
at getData (/root/Muser/node_modules/spotify-url-info/index.js:13:27)
at module.exports.getPreview (/root/Muser/node_modules/spotify-url-info/index.js:135:36)
at Client.<anonymous> (/root/Muser/bot.js:352:36)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5) |
My error
I was being dumb Issue fixed Thanks
@pgamerxdev how did you fix it?
I keep getting this error again and again. Never works for me My version is latest My code is -
it gives error at line -
const song = await getPreview(args[0])
How I defined -
var { getData, getPreview } = require("spotify-url-info");