sentry stuff

This commit is contained in:
Emily 2021-03-13 14:32:17 +11:00
parent 761cb38e3b
commit 7ed859d8e5

View file

@ -123,11 +123,11 @@ client.eventLoader.loadEventModules();
client.createEventListeners(); client.createEventListeners();
// Development mode is set in botconfig.yml, and disables some stuff if enabled. Imagine how messy Sentry would be without this! // Development mode is set in botconfig.yml, and disables some stuff if enabled. Imagine how messy Sentry would be without this!
if (client.config.devmode === true) { if (client.config.developmentMode === false) {
try { try {
sentry.init({ dsn: client.config.keys.sentry }); sentry.init({ dsn: client.config.keys.sentry });
} catch (err) { } catch (err) {
client.logger.error('SENTRY_INIT_ERROR', `Sentry failed to initialize: ${err}`); client.logger.error('SENTRY_INIT_ERROR', `Sentry failed to initialize: ${err}`);
} }
} else { } else {
client.logger.warning('DEVELOPMENT_MODE', 'Running in development mode, some features have been disabled.'); client.logger.warning('DEVELOPMENT_MODE', 'Running in development mode, some features have been disabled.');