-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limited to One Playlist #17
Comments
How you're doing it? Please paste the code here. |
This is the file. I am using it for discord js. |
All the problems are related to scope. Please have a look here For example - In order to fetch contents from two playlist, you've to do - const ytlist = require('youtube-playlist');
ytlist(urlOne, 'url').then(urlOneContent => {
ytlist(urlTwo, 'url').then(urlTwoContent => {
const urlOneData = urlOneContent.data.playlist;
const urlTwoData = urlTwoContent.data.playlist;
// do something with the available data
});
}); In your code, you're doing - moronsPlaylist(moronsUrl, 'url').then(res => {
ranYtVid = res.data.playlist;
});
solidslicerPlaylist(solidslicerUrl, 'url').then(res => {
ranYtVid2 = res.data.playlist;
}); You've trying to access if(args[0] === '107Morons') { } You'll end up getting Hope this helps. |
It works perfectly. But now I am getting this error: "Cannot read property 'send' of undefined at /app/commands/video.js:32:19" |
The problem is not related to this module, so I'm closing the issue. Will be happy to clear the doubts though. Also, try to debug the code - use |
If I try to use this module for multiple playlist, it causes an error. I even tried calling the module in 2 different const, but it just causes the same issues.
The text was updated successfully, but these errors were encountered: