Make it work ( for real this time )
This commit is contained in:
parent
b18faec59e
commit
3da7ee5dd6
1 changed files with 11 additions and 9 deletions
|
@ -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')
|
||||||
|
.then(output => {
|
||||||
const Embed = this.client.util.embed()
|
const Embed = this.client.util.embed()
|
||||||
.addField('stdout', stdout)
|
.addField('stdout', output.stdout)
|
||||||
.addField('stderr', stderr);
|
.addField('stderr', output.stderr);
|
||||||
message.channel.send({embed: Embed})
|
message.channel.send({embed: Embed})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.channel.send(`stdout: ${stdout}\nstderr: ${stderr}`);
|
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…
Reference in a new issue