From cca81777bab775baf3539fea45ef7db682fffba9 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Mon, 24 Feb 2020 14:36:37 +0100 Subject: [PATCH] fixed error --- commands/owner/update.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/commands/owner/update.js b/commands/owner/update.js index 5623b187..7f139b57 100644 --- a/commands/owner/update.js +++ b/commands/owner/update.js @@ -20,14 +20,12 @@ class EvalCommand extends Command { await exec('git pull') .then(output => { const Embed = this.client.util.embed() - .addField('stdout', output.stdout) - .addField('stderr', output.stderr); + .addField('stdout', output.stdout ? output.stdout : 'No update') + .addField('stderr', output.stderr ? output.stderr : 'No error'); 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}`); }); } }