summaryrefslogtreecommitdiff
path: root/modules/statusbot
diff options
context:
space:
mode:
Diffstat (limited to 'modules/statusbot')
-rw-r--r--modules/statusbot/statusbot.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/statusbot/statusbot.js b/modules/statusbot/statusbot.js
index 1af5804..a518b17 100644
--- a/modules/statusbot/statusbot.js
+++ b/modules/statusbot/statusbot.js
@@ -272,8 +272,14 @@ function matrixSendMsgLogin(text, cb) {
module.exports = function(app, io, _moddir) {
moddir = _moddir;
- const config = require("./matrix.json");
- const accounts = require("./accounts.json");
+ let config, accounts;
+ try {
+ config = require("./matrix.json");
+ accounts = require("./accounts.json");
+ } catch (e) {
+ console.error(e);
+ return false;
+ }
const ratelimit = new PRatelimit(1000);