1
0
Fork 0

only link

Commando
loicbersier 6 years ago
parent c07739115a
commit 42785a83c7

@ -20,6 +20,7 @@ module.exports = class youtubeCommand extends Command {
} }
async run(message, { link }) { async run(message, { link }) {
if(link.includes("http") || link.includes("www")) {
ytdl(link, { filter: (format) => format.container === 'mp4' }) ytdl(link, { filter: (format) => format.container === 'mp4' })
.pipe(fs.createWriteStream('video.mp4')) .pipe(fs.createWriteStream('video.mp4'))
setTimeout(function(){ setTimeout(function(){
@ -27,7 +28,8 @@ module.exports = class youtubeCommand extends Command {
.catch(error => { .catch(error => {
message.say('Video too long') message.say('Video too long')
}) })
}, 2000) }, 5000)
} }
}
} }
Loading…
Cancel
Save