diff --git a/src/index.js b/src/index.js index 010cfc5..a6a5c5b 100644 --- a/src/index.js +++ b/src/index.js @@ -34,11 +34,12 @@ const utils = require('./utils'); const main = require('./main'); const knex = require('./knex'); const legacyMigrator = require('./legacy/legacyMigrator'); +const { client } = require('./knex'); // Error handling process.on('uncaughtException', err => { console.error(err); - utils.postError(config.errorChannelId, `\`\`\`js\n${err.stack}\n\`\`\``); + // utils.postError(config.errorChannelId, `\`\`\`js\n${err.stack}\n\`\`\``); }); // Force crash on unhandled rejections (use something like forever/pm2 to restart) @@ -47,7 +48,8 @@ process.on('unhandledRejection', err => { // We ignore stack traces for network errors from Eris (their stack traces are unreadably long) err = new Error(err.message); } - utils.postError(config.errorChannelId, `\`\`\`js\n${err.stack}\n\`\`\``); + console.error(err); + // utils.postError(config.errorChannelId, `\`\`\`js\n${err.stack}\n\`\`\``); }); (async function() {