Show stack trace on command error
This commit is contained in:
parent
4a86998814
commit
dcfaf75c57
|
@ -172,10 +172,10 @@ dClient.on('message', message => {
|
|||
(res) => {
|
||||
if (res === false) message.channel.send(`**Usage:** \`!${commandName} ${command.usage}\``);
|
||||
},
|
||||
(rej) => {
|
||||
message.reply(`:warning: An error has been encountered while processing your command.`);
|
||||
console.error(rej.stack || rej);
|
||||
(err) => {
|
||||
message.reply(`:warning: An error occured: \`\`\`\n${err.stack}\n\`\`\``);
|
||||
console.error(err.stack);
|
||||
}
|
||||
)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue