Show stack trace on command error

This commit is contained in:
Lamp 2018-05-31 12:48:30 -07:00 committed by GitHub
parent 4a86998814
commit dcfaf75c57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -172,10 +172,10 @@ dClient.on('message', message => {
(res) => { (res) => {
if (res === false) message.channel.send(`**Usage:** \`!${commandName} ${command.usage}\``); if (res === false) message.channel.send(`**Usage:** \`!${commandName} ${command.usage}\``);
}, },
(rej) => { (err) => {
message.reply(`:warning: An error has been encountered while processing your command.`); message.reply(`:warning: An error occured: \`\`\`\n${err.stack}\n\`\`\``);
console.error(rej.stack || rej); console.error(err.stack);
} }
) )
}); });
}); });