@ -69,31 +76,30 @@ class DownloadCommand extends Command {
preset:'General/Gmail Small 10 Minutes 288p30'
};
//Compress vid if bigger than 8MB
hbjs.spawn(options)
.on('start',function(){
message.channel.send('Video bigger than 8MB compressing now (This can take a long time!)\nWant it to go faster? Donate to the dev with the donate command, so i can get a better server and do it faster!');
})
.on('error',err=>{
message.channel.send('An error has occured while compressing the video');
console.error(err);
})
.on('progress',progress=>{
console.log(
'Percent complete: %s, ETA: %s',
progress.percentComplete,
progress.eta
);
})
.on('end',function(){
message.delete();
message.channel.send(`Downloaded by ${message.author.username}`,{files:['./videoReady.mp4']})
message.channel.send('Video bigger than 8MB compressing now <a:loadingmin:527579785212329984> (This can take a long time!)\nWant it to go faster? Donate to the dev with the donate command, so i can get a better server and do it faster!').then(msg=>{
handbrake.on('end',function(){
msg.delete();
});
});
});
handbrake.on('error',err=>{
message.channel.send('An error has occured while compressing the video');
console.error(err);
});
handbrake.on('progress',progress=>{
console.log(
'Percent complete: %s, ETA: %s',
progress.percentComplete,
progress.eta
);
});
handbrake.on('end',function(){
message.delete();
message.channel.send(`Downloaded by ${message.author.username}`,{files:['./videoReady.mp4']})