Make it work again
This commit is contained in:
parent
c0df5e0367
commit
b18faec59e
1 changed files with 10 additions and 13 deletions
|
@ -17,19 +17,16 @@ class EvalCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message) {
|
async exec(message) {
|
||||||
async function update() {
|
const { stdout, stderr } = await exec('git pull');
|
||||||
const { stdout, stderr } = await exec('git pull');
|
const Embed = this.client.util.embed()
|
||||||
const Embed = this.client.util.embed()
|
.addField('stdout', stdout)
|
||||||
.addField('stdout', stdout)
|
.addField('stderr', stderr);
|
||||||
.addField('stderr', stderr);
|
message.channel.send({embed: Embed})
|
||||||
message.channel.send({embed: Embed})
|
.catch(() => {
|
||||||
.catch(() => {
|
message.channel.send(`stdout: ${stdout}\nstderr: ${stderr}`);
|
||||||
message.channel.send(`stdout: ${stdout}\nstderr: ${stderr}`);
|
});
|
||||||
});
|
console.log(`stdout: ${stdout}`);
|
||||||
console.log(`stdout: ${stdout}`);
|
console.error(`stderr: ${stderr}`);
|
||||||
console.error(`stderr: ${stderr}`);
|
|
||||||
}
|
|
||||||
update();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue