aboutsummaryrefslogtreecommitdiff
path: root/bot.js
diff options
context:
space:
mode:
authorUnknown <jtsshieh@outlook.com>2018-03-18 20:37:17 -0400
committerUnknown <jtsshieh@outlook.com>2018-03-18 20:37:17 -0400
commitb3e275fb97ab96bec5e5de0cd21f8b8b6b308008 (patch)
treeb101de676bc03d0a418079498593bf863cfbdc73 /bot.js
parent62172685f32f8d4262d15528eaae8a8af2d85d24 (diff)
downloadPokeBot-b3e275fb97ab96bec5e5de0cd21f8b8b6b308008.tar.gz
PokeBot-b3e275fb97ab96bec5e5de0cd21f8b8b6b308008.tar.bz2
PokeBot-b3e275fb97ab96bec5e5de0cd21f8b8b6b308008.zip
reven
Diffstat (limited to 'bot.js')
-rw-r--r--bot.js6
1 files changed, 4 insertions, 2 deletions
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!');