From b18faec59e0614961464e3986d59c987206b70ef Mon Sep 17 00:00:00 2001 From: loicbersier Date: Fri, 22 Nov 2019 12:58:12 +0100 Subject: [PATCH] Make it work again --- commands/owner/update.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/commands/owner/update.js b/commands/owner/update.js index 9667be3..9242e2f 100644 --- a/commands/owner/update.js +++ b/commands/owner/update.js @@ -17,19 +17,16 @@ class EvalCommand extends Command { } async exec(message) { - async function update() { - 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}`); - }); - console.log(`stdout: ${stdout}`); - console.error(`stderr: ${stderr}`); - } - update(); + 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}`); + }); + console.log(`stdout: ${stdout}`); + console.error(`stderr: ${stderr}`); } }