@ -116,6 +116,7 @@ class DownloadCommand extends Command {
}
}
letcompressmsg=awaitmessage.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!');
letcompressmsg=awaitmessage.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!');
loadingmsg.delete();
constoptions={
constoptions={
input:`${os.tmpdir()}/${fileName}.mp4`,
input:`${os.tmpdir()}/${fileName}.mp4`,
@ -127,7 +128,6 @@ class DownloadCommand extends Command {
lethandbrake=hbjs.spawn(options);
lethandbrake=hbjs.spawn(options);
handbrake.on('error',err=>{
handbrake.on('error',err=>{
console.error(err);
console.error(err);
loadingmsg.delete();
compressmsg.delete();
compressmsg.delete();
returnmessage.channel.send('An error has occured while compressing the video');
returnmessage.channel.send('An error has occured while compressing the video');
});
});
@ -140,12 +140,10 @@ class DownloadCommand extends Command {
});
});
handbrake.on('end',asyncfunction(){
handbrake.on('end',asyncfunction(){
message.delete();
message.delete();
loadingmsg.delete();
compressmsg.delete();
compressmsg.delete();
returnmessage.channel.send(`Downloaded by ${message.author.username}`,{files:[`${os.tmpdir()}/${fileName}compressed.mp4`]})
returnmessage.channel.send(`Downloaded by ${message.author.username}`,{files:[`${os.tmpdir()}/${fileName}compressed.mp4`]})