Fixed youtube vid
This commit is contained in:
parent
c995bff183
commit
5def6fce12
1 changed files with 3 additions and 1 deletions
|
@ -24,8 +24,10 @@ module.exports = class youtubeCommand extends Command {
|
||||||
.pipe(fs.createWriteStream('video.mp4'))
|
.pipe(fs.createWriteStream('video.mp4'))
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
message.channel.sendFile("./video.mp4")
|
message.channel.sendFile("./video.mp4")
|
||||||
|
.catch(error => {
|
||||||
|
message.say('Video too long')
|
||||||
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
process.on('unhandledRejection',error => message.say('Video too long'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue