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