From 4e305be65e5a0fa736b8c36115fdf42a78068a2d Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 12 Oct 2019 16:46:20 +0200 Subject: [PATCH] delete the process message when it really finished --- commands/fun/vidshittifyer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/fun/vidshittifyer.js b/commands/fun/vidshittifyer.js index c29de81f..879284af 100644 --- a/commands/fun/vidshittifyer.js +++ b/commands/fun/vidshittifyer.js @@ -49,7 +49,7 @@ class vidshittifyerCommand extends Command { } else { compression = '10k'; } - let option = `-b:v ${compression} -b:a ${compression}`; + let option = `-b:v ${compression} -b:a ${compression}`; let loadingmsg = await message.channel.send('Processing '); @@ -60,7 +60,6 @@ class vidshittifyerCommand extends Command { loadingmsg.delete(); return message.channel.send('An error has occured, I can\'t download from the link you provided.'); } - loadingmsg.delete(); shittify(); }); } else { @@ -70,6 +69,7 @@ class vidshittifyerCommand extends Command { function shittify() { exec(`ffmpeg -i ${input} ${option} -vcodec libx264 -r 5 -r 15 ${output}`) .then(() => { + loadingmsg.delete(); message.delete(); return message.channel.send({files: [output]}) .catch(err => {