From c62fcb68aba1b7119f752b89d7ccb13bbeb84ba6 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Wed, 16 Oct 2019 17:49:31 +0200 Subject: [PATCH] delete loading message when compression is being done --- commands/utility/download.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/commands/utility/download.js b/commands/utility/download.js index 57fd3654..5e79b987 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -116,6 +116,7 @@ class DownloadCommand extends Command { } let compressmsg = await 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!'); + loadingmsg.delete(); const options = { input: `${os.tmpdir()}/${fileName}.mp4`, @@ -127,7 +128,6 @@ class DownloadCommand extends Command { let handbrake = hbjs.spawn(options); handbrake.on('error', err => { console.error(err); - loadingmsg.delete(); compressmsg.delete(); return message.channel.send('An error has occured while compressing the video'); }); @@ -140,12 +140,10 @@ class DownloadCommand extends Command { }); handbrake.on('end', async function () { message.delete(); - loadingmsg.delete(); compressmsg.delete(); return message.channel.send(`Downloaded by ${message.author.username}`, { files: [`${os.tmpdir()}/${fileName}compressed.mp4`] }) .catch(err => { console.error(err); - loadingmsg.delete(); compressmsg.delete(); return message.channel.send('File too big'); });