summaryrefslogtreecommitdiff
path: root/modules/statusbot
diff options
context:
space:
mode:
authorTom Smeding <t.j.smeding@uu.nl>2024-07-22 10:43:21 +0200
committerTom Smeding <t.j.smeding@uu.nl>2024-07-22 10:43:21 +0200
commit25f68eb23dd53083e84608e2b1af2109d6a260ac (patch)
tree1d3f7e8b64e5cac8c23dc57bb68b214e26c77569 /modules/statusbot
parent9a41d980622b449d41999dc8f46226c1879e00ef (diff)
Allow failing modules if they miss data files
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);