From 8e6e441159639df62ba791ba74f620e9ead0a20b Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 20 Feb 2020 20:37:42 +0100 Subject: [PATCH] Fix the set interval --- commands/utility/download.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/utility/download.js b/commands/utility/download.js index 1db2696b..9e26e773 100644 --- a/commands/utility/download.js +++ b/commands/utility/download.js @@ -104,11 +104,12 @@ class DownloadCommand extends Command { }); // Every 5 seconds update the compress message with the % - setInterval(() => { + let editmsg = setInterval(() => { compressmsg.edit(`Compression status: Percent complete: ${percentComplete}, ETA: ${eta}\nWant it to go faster? Donate to the dev with the donate command, so i can get a better server and do it faster!`); }, 5000); handbrake.on('end', async function () { + clearInterval(editmsg); file = fs.statSync(`${os.tmpdir()}/${fileName}compressed.mp4`); fileSize = file.size / 1000000.0;