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')
.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}`);
});
}
}