diff --git a/commands/fun/youtube.js b/commands/fun/youtube.js index ccd5da6..a4a63a0 100644 --- a/commands/fun/youtube.js +++ b/commands/fun/youtube.js @@ -20,6 +20,7 @@ module.exports = class youtubeCommand extends Command { } async run(message, { link }) { + if(link.includes("http") || link.includes("www")) { ytdl(link, { filter: (format) => format.container === 'mp4' }) .pipe(fs.createWriteStream('video.mp4')) setTimeout(function(){ @@ -27,7 +28,8 @@ module.exports = class youtubeCommand extends Command { .catch(error => { message.say('Video too long') }) - }, 2000) + }, 5000) } + } } \ No newline at end of file