1
0
Fork 0

Make it work ( for real this time )

akairo
loicbersier 5 years ago
parent b18faec59e
commit 3da7ee5dd6

@ -17,16 +17,18 @@ class EvalCommand extends Command {
} }
async exec(message) { async exec(message) {
const { stdout, stderr } = await exec('git pull'); await exec('git pull')
const Embed = this.client.util.embed() .then(output => {
.addField('stdout', stdout) const Embed = this.client.util.embed()
.addField('stderr', stderr); .addField('stdout', output.stdout)
message.channel.send({embed: Embed}) .addField('stderr', output.stderr);
.catch(() => { message.channel.send({embed: Embed})
message.channel.send(`stdout: ${stdout}\nstderr: ${stderr}`); .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}`);
} }
} }

Loading…
Cancel
Save