From 2cebec4f8b984f640a2a26eb91039ccb13a950fd Mon Sep 17 00:00:00 2001
From: loicbersier <loic.bersier1@gmail.com>
Date: Sat, 9 Nov 2019 13:38:46 +0100
Subject: [PATCH] restore the look of the old download message

---
 commands/utility/download.js | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/commands/utility/download.js b/commands/utility/download.js
index 0fe7788b..9cda0c7d 100644
--- a/commands/utility/download.js
+++ b/commands/utility/download.js
@@ -50,6 +50,13 @@ class DownloadCommand extends Command {
 			fileName = `${message.author.id}_video`;
 		}
 
+
+		const Embed = new MessageEmbed()
+			.setColor(message.member.displayHexColor)
+			.setTitle(`Downloaded by ${message.author.username}`)
+			.setURL(link)
+			.setDescription(args.caption);
+
 		if (link.includes('http') || link.includes('www')) {
 			let loadingmsg = await message.channel.send('Downloading <a:loadingmin:527579785212329984>');
 
@@ -98,12 +105,6 @@ class DownloadCommand extends Command {
 					handbrake.on('end', async function () {
 						message.delete();
 						compressmsg.delete();
-						
-						const Embed = new MessageEmbed()
-							.setColor(message.member.displayHexColor)
-							.setAuthor(`Downloaded by ${message.author.username}`, message.author.displayAvatarURL(), link)
-							.setDescription(args.caption)
-							.setFooter('You can get the original video by clicking on the "downloaded by" message!');
 
 						return message.channel.send({embed: Embed, files: [`${os.tmpdir()}/${fileName}compressed.mp4`]})
 							.catch(err => {
@@ -116,13 +117,6 @@ class DownloadCommand extends Command {
 					message.delete();
 					loadingmsg.delete();
 
-					const Embed = new MessageEmbed()
-						.setColor(message.member.displayHexColor)
-						.setAuthor(`Downloaded by ${message.author.username}`, message.author.displayAvatarURL(), link)
-						.setDescription(args.caption)
-						.setFooter('You can get the original video by clicking on the "downloaded by" message!');
-						
-
 					return message.channel.send({embed: Embed, files: [`${os.tmpdir()}/${fileName}.mp4`]})
 						.catch(err => {
 							console.error(err);