fixed error

This commit is contained in:
loicbersier 2020-02-24 14:36:37 +01:00
parent 9b14538fe4
commit cca81777ba

View file

@ -20,14 +20,12 @@ class EvalCommand extends Command {
await exec('git pull') await exec('git pull')
.then(output => { .then(output => {
const Embed = this.client.util.embed() const Embed = this.client.util.embed()
.addField('stdout', output.stdout) .addField('stdout', output.stdout ? output.stdout : 'No update')
.addField('stderr', output.stderr); .addField('stderr', output.stderr ? output.stderr : 'No error');
message.channel.send({embed: Embed}) message.channel.send({embed: Embed})
.catch(() => { .catch(() => {
message.channel.send(`stdout: ${output.stdout}\nstderr: ${output.stderr}`); message.channel.send(`stdout: ${output.stdout}\nstderr: ${output.stderr}`);
}); });
console.log(`stdout: ${output.stdout}`);
console.error(`stderr: ${output.stderr}`);
}); });
} }
} }