Comments (5)
How you're doing it? Please paste the code here.
from youtube-playlist.
This is the file. I am using it for discord js.
https://github.com/Gekocaretaker/Lizz-AI/blob/master/commands/video.js
from youtube-playlist.
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 ranYtVid
and ranYtVid2
inside -
if(args[0] === '107Morons') { }
You'll end up getting reference error
.
Hope this helps.
from youtube-playlist.
It works perfectly. But now I am getting this error: "Cannot read property 'send' of undefined at /app/commands/video.js:32:19"
And I don't know what is wrong.
from youtube-playlist.
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 console.log(message.channel)
to see what you're getting here.
from youtube-playlist.
Related Issues (17)
- Be able to get playlist information from a video that is attached to a playlist HOT 4
- It only returns the first 100 of the playlist HOT 1
- Add playlist title HOT 3
- Can't go passed 100
- Some time the playlist isn't loading to data HOT 6
- Sorry man Doesn't seem like it's working anymore HOT 10
- Limit to 100 videos HOT 2
- Weekly downloads not found HOT 2
- Not getting Playlist song list HOT 4
- can only get 100 first video urls in playlist HOT 6
- No longer works HOT 2
- Installing This Package Is Pruning All My Node Modules That I need
- Get all 3 opts in one call? HOT 2
- Does it require an API key? HOT 1
- Why use this library and not Pufetch? HOT 2
- stuck on "Cross-Origin Request Blocked" warning HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube-playlist.