If can't send embed send it as message

This commit is contained in:
loicbersier 2019-11-22 12:32:08 +01:00
parent 8b889c7210
commit 4c3ea9ec8e

View file

@ -22,7 +22,10 @@ class EvalCommand extends Command {
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(() => {
message.channel.send(`stdout: ${stdout}\nstderr: ${stderr}`);
});
console.log(`stdout: ${stdout}`); console.log(`stdout: ${stdout}`);
console.error(`stderr: ${stderr}`); console.error(`stderr: ${stderr}`);
} }