Fixed youtube vid

This commit is contained in:
loicbersier 2018-10-10 12:45:04 +02:00
parent c995bff183
commit 5def6fce12

View file

@ -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'));
}
}