From 3da7ee5dd6d8d437b2d7c81a614521fc54af5942 Mon Sep 17 00:00:00 2001
From: loicbersier <loic.bersier1@gmail.com>
Date: Fri, 22 Nov 2019 13:00:41 +0100
Subject: [PATCH] Make it work ( for real this time )

---
 commands/owner/update.js | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/commands/owner/update.js b/commands/owner/update.js
index 9242e2fc..5623b187 100644
--- a/commands/owner/update.js
+++ b/commands/owner/update.js
@@ -17,16 +17,18 @@ class EvalCommand extends Command {
 	}
 
 	async exec(message) {
-		const { stdout, stderr } = await exec('git pull');
-		const Embed = this.client.util.embed()
-			.addField('stdout', stdout)
-			.addField('stderr', stderr);
-		message.channel.send({embed: Embed})
-			.catch(() => {
-				message.channel.send(`stdout: ${stdout}\nstderr: ${stderr}`);
+		await exec('git pull')
+			.then(output => {
+				const Embed = this.client.util.embed()
+					.addField('stdout', output.stdout)
+					.addField('stderr', output.stderr);
+				message.channel.send({embed: Embed})
+					.catch(() => {
+						message.channel.send(`stdout: ${output.stdout}\nstderr: ${output.stderr}`);
+					});
+				console.log(`stdout: ${output.stdout}`);
+				console.error(`stderr: ${output.stderr}`);
 			});
-		console.log(`stdout: ${stdout}`);
-		console.error(`stderr: ${stderr}`);
 	}
 }