Delete loading message first

This commit is contained in:
loicbersier 2019-11-11 18:04:40 +01:00
parent 57c5d5a0a5
commit 4113b0dab1

View file

@ -127,12 +127,13 @@ class DownloadCommand extends Command {
.catch(err => { .catch(err => {
console.error(err); console.error(err);
compressmsg.delete(); compressmsg.delete();
loadingmsg.delete();
return message.channel.send('File too big'); return message.channel.send('File too big');
}); });
}); });
} else { } else {
message.delete();
loadingmsg.delete(); loadingmsg.delete();
message.delete();
return message.channel.send({embed: Embed, files: [`${os.tmpdir()}/${fileName}.mp4`]}) return message.channel.send({embed: Embed, files: [`${os.tmpdir()}/${fileName}.mp4`]})
.catch(err => { .catch(err => {