From 5def6fce122ab3a636e60c36c8c55649c17a6f51 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 10 Oct 2018 12:45:04 +0200 Subject: [PATCH] Fixed youtube vid --- commands/fun/{youtube => youtube.js} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename commands/fun/{youtube => youtube.js} (91%) diff --git a/commands/fun/youtube b/commands/fun/youtube.js similarity index 91% rename from commands/fun/youtube rename to commands/fun/youtube.js index 2d798f89..ccd5da69 100644 --- a/commands/fun/youtube +++ b/commands/fun/youtube.js @@ -24,8 +24,10 @@ module.exports = class youtubeCommand extends Command { .pipe(fs.createWriteStream('video.mp4')) setTimeout(function(){ message.channel.sendFile("./video.mp4") + .catch(error => { + message.say('Video too long') + }) }, 2000) - process.on('unhandledRejection',error => message.say('Video too long')); } } \ No newline at end of file