From b3e275fb97ab96bec5e5de0cd21f8b8b6b308008 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 18 Mar 2018 20:37:17 -0400 Subject: reven --- bot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bot.js') diff --git a/bot.js b/bot.js index eb343f1..0ac3053 100644 --- a/bot.js +++ b/bot.js @@ -12,8 +12,8 @@ bot.queue = new Discord.Collection(); bot.plugins = { music : require('./Plugins/Music.js') , economy : require('./Plugins/Economy.js'), settings : require('./Plugins/settings.js')}; cmdLoader(); -const Raven = require('raven'); -Raven.config(config.sentry).install(); +bot.Raven = require('raven'); +bot.Raven.config(config.sentry).install(); async function cmdLoader() { const categories = await fs.readdirSync('./commands'); @@ -53,6 +53,7 @@ async function loadCmd(category, cmd) { catch (err) { console.log(`An error has occured trying to load the command '${cmd.split('.')[0]}'`); console.log(err.stack); + bot.Raven.captureException(err); } } @@ -71,6 +72,7 @@ fs.readdir('./events', (err, files) => { catch (err) { console.log('An error has occured trying to load a event. Here is the error.'); console.log(err.stack); + bot.Raven.captureException(err); } }); console.log('Event Loading complete!'); -- cgit v1.2.3